instead of overwriting the weather module again, I'll put everything here.

for whomever uses this, since it is in cvs, it's alpha software, just like e17. It's bound to not work for someone. If it doesn't work for you, and you are not into the whole 'helping out to fix the problem' deal that's attached to open source projects, feel free to not use this module. there are alternatives out there.


SVN revision: 28456
master
Viktor Kojouharov 16 years ago
commit b3db316e42
  1. 25
      .cvsignore
  2. 218
      ABOUT-NLS
  3. 1
      AUTHORS
  4. 28
      COPYING
  5. 33
      COPYING-PLAIN
  6. 0
      ChangeLog
  7. 11
      INSTALL
  8. 46
      Makefile.am
  9. 0
      NEWS
  10. 1
      README
  11. 9478
      aclocal.m4
  12. 27
      autogen.sh
  13. 157
      configure.in
  14. 149
      e_mod_config.c
  15. 9
      e_mod_config.h
  16. 1224
      e_mod_main.c
  17. 59
      e_mod_main.h
  18. 50
      e_modules-forecasts.spec.in
  19. BIN
      fonts/VeraBd.ttf
  20. BIN
      fonts/vera.ttf
  21. 239
      forecasts.edc
  22. 2
      images/.cvsignore
  23. BIN
      images/0.png
  24. BIN
      images/1.png
  25. BIN
      images/10.png
  26. BIN
      images/11.png
  27. BIN
      images/12.png
  28. BIN
      images/13.png
  29. BIN
      images/14.png
  30. BIN
      images/15.png
  31. BIN
      images/16.png
  32. BIN
      images/17.png
  33. BIN
      images/18.png
  34. BIN
      images/19.png
  35. BIN
      images/2.png
  36. BIN
      images/20.png
  37. BIN
      images/21.png
  38. BIN
      images/22.png
  39. BIN
      images/23.png
  40. BIN
      images/24.png
  41. BIN
      images/25.png
  42. BIN
      images/26.png
  43. BIN
      images/27.png
  44. BIN
      images/28.png
  45. BIN
      images/29.png
  46. BIN
      images/3.png
  47. BIN
      images/30.png
  48. BIN
      images/31.png
  49. BIN
      images/32.png
  50. BIN
      images/3200.png
  51. BIN
      images/33.png
  52. BIN
      images/34.png
  53. BIN
      images/35.png
  54. BIN
      images/36.png
  55. BIN
      images/37.png
  56. BIN
      images/38.png
  57. BIN
      images/39.png
  58. BIN
      images/4.png
  59. BIN
      images/40.png
  60. BIN
      images/41.png
  61. BIN
      images/42.png
  62. BIN
      images/43.png
  63. BIN
      images/44.png
  64. BIN
      images/45.png
  65. BIN
      images/46.png
  66. BIN
      images/47.png
  67. BIN
      images/5.png
  68. BIN
      images/6.png
  69. BIN
      images/7.png
  70. BIN
      images/8.png
  71. BIN
      images/9.png
  72. 52
      images/Makefile.am
  73. 7
      module.desktop.in
  74. BIN
      module.edj
  75. 4
      po/.cvsignore
  76. 28
      po/Makefile.am
  77. 376
      po/Makefile.in
  78. 84
      po/eo.po
  79. 80
      po/it.po
  80. 82
      po/ja.po
  81. 83
      po/sv.po

@ -0,0 +1,25 @@
.deps
.libs
Makefile
Makefile.in
aclocal.m4
autom4te.cache
config.guess
config.h
config.h.in
config.log
config.status
config.sub
configure
depcomp
install-sh
libtool
missing
ltmain.sh
stamp-h1
*.lo
*.la
forecasts.edj
*.spec
*.tar.gz
module.desktop

@ -0,0 +1,218 @@
Notes on the Free Translation Project
*************************************
Free software is going international! The Free Translation Project
is a way to get maintainers of free software, translators, and users all
together, so that will gradually become able to speak many languages.
A few packages already provide translations for their messages.
If you found this `ABOUT-NLS' file inside a distribution, you may
assume that the distributed package does use GNU `gettext' internally,
itself available at your nearest GNU archive site. But you do _not_
need to install GNU `gettext' prior to configuring, installing or using
this package with messages translated.
Installers will find here some useful hints. These notes also
explain how users should proceed for getting the programs to use the
available translations. They tell how people wanting to contribute and
work at translations should contact the appropriate team.
When reporting bugs in the `intl/' directory or bugs which may be
related to internationalization, you should tell about the version of
`gettext' which is used. The information can be found in the
`intl/VERSION' file, in internationalized packages.
Quick configuration advice
==========================
If you want to exploit the full power of internationalization, you
should configure it using
./configure --with-included-gettext
to force usage of internationalizing routines provided within this
package, despite the existence of internationalizing capabilities in the
operating system where this package is being installed. So far, only
the `gettext' implementation in the GNU C library version 2 provides as
many features (such as locale alias, message inheritance, automatic
charset conversion or plural form handling) as the implementation here.
It is also not possible to offer this additional functionality on top
of a `catgets' implementation. Future versions of GNU `gettext' will
very likely convey even more functionality. So it might be a good idea
to change to GNU `gettext' as soon as possible.
So you need _not_ provide this option if you are using GNU libc 2 or
you have installed a recent copy of the GNU gettext package with the
included `libintl'.
INSTALL Matters
===============
Some packages are "localizable" when properly installed; the
programs they contain can be made to speak your own native language.
Most such packages use GNU `gettext'. Other packages have their own
ways to internationalization, predating GNU `gettext'.
By default, this package will be installed to allow translation of
messages. It will automatically detect whether the system already
provides the GNU `gettext' functions. If not, the GNU `gettext' own
library will be used. This library is wholly contained within this
package, usually in the `intl/' subdirectory, so prior installation of
the GNU `gettext' package is _not_ required. Installers may use
special options at configuration time for changing the default
behaviour. The commands:
./configure --with-included-gettext
./configure --disable-nls
will respectively bypass any pre-existing `gettext' to use the
internationalizing routines provided within this package, or else,
_totally_ disable translation of messages.
When you already have GNU `gettext' installed on your system and run
configure without an option for your new package, `configure' will
probably detect the previously built and installed `libintl.a' file and
will decide to use this. This might be not what is desirable. You
should use the more recent version of the GNU `gettext' library. I.e.
if the file `intl/VERSION' shows that the library which comes with this
package is more recent, you should use
./configure --with-included-gettext
to prevent auto-detection.
The configuration process will not test for the `catgets' function
and therefore it will not be used. The reason is that even an
emulation of `gettext' on top of `catgets' could not provide all the
extensions of the GNU `gettext' library.
Internationalized packages have usually many `po/LL.po' files, where
LL gives an ISO 639 two-letter code identifying the language. Unless
translations have been forbidden at `configure' time by using the
`--disable-nls' switch, all available translations are installed
together with the package. However, the environment variable `LINGUAS'
may be set, prior to configuration, to limit the installed set.
`LINGUAS' should then contain a space separated list of two-letter
codes, stating which languages are allowed.
Using This Package
==================
As a user, if your language has been installed for this package, you
only have to set the `LANG' environment variable to the appropriate
`LL_CC' combination. Here `LL' is an ISO 639 two-letter language code,
and `CC' is an ISO 3166 two-letter country code. For example, let's
suppose that you speak German and live in Germany. At the shell
prompt, merely execute `setenv LANG de_DE' (in `csh'),
`export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash').
This can be done from your `.login' or `.profile' file, once and for
all.
You might think that the country code specification is redundant.
But in fact, some languages have dialects in different countries. For
example, `de_AT' is used for Austria, and `pt_BR' for Brazil. The
country code serves to distinguish the dialects.
The locale naming convention of `LL_CC', with `LL' denoting the
language and `CC' denoting the country, is the one use on systems based
on GNU libc. On other systems, some variations of this scheme are
used, such as `LL' or `LL_CC.ENCODING'. You can get the list of
locales supported by your system for your country by running the command
`locale -a | grep '^LL''.
Not all programs have translations for all languages. By default, an
English message is shown in place of a nonexistent translation. If you
understand other languages, you can set up a priority list of languages.
This is done through a different environment variable, called
`LANGUAGE'. GNU `gettext' gives preference to `LANGUAGE' over `LANG'
for the purpose of message handling, but you still need to have `LANG'
set to the primary language; this is required by other parts of the
system libraries. For example, some Swedish users who would rather
read translations in German than English for when Swedish is not
available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'.
In the `LANGUAGE' environment variable, but not in the `LANG'
environment variable, `LL_CC' combinations can be abbreviated as `LL'
to denote the language's main dialect. For example, `de' is equivalent
to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT'
(Portuguese as spoken in Portugal) in this context.
Translating Teams
=================
For the Free Translation Project to be a success, we need interested
people who like their own language and write it well, and who are also
able to synergize with other translators speaking the same language.
Each translation team has its own mailing list. The up-to-date list of
teams can be found at the Free Translation Project's homepage,
`http://www.iro.umontreal.ca/contrib/po/HTML/', in the "National teams"
area.
If you'd like to volunteer to _work_ at translating messages, you
should become a member of the translating team for your own language.
The subscribing address is _not_ the same as the list itself, it has
`-request' appended. For example, speakers of Swedish can send a
message to `sv-request@li.org', having this message body:
subscribe
Keep in mind that team members are expected to participate
_actively_ in translations, or at solving translational difficulties,
rather than merely lurking around. If your team does not exist yet and
you want to start one, or if you are unsure about what to do or how to
get started, please write to `translation@iro.umontreal.ca' to reach the
coordinator for all translator teams.
The English team is special. It works at improving and uniformizing
the terminology in use. Proven linguistic skill are praised more than
programming skill, here.
Available Packages
==================
Languages are not equally supported in all packages. The following
matrix shows the current state of internationalization, as of April
2005. The matrix shows, in regard of each package, for which languages
PO files have been submitted to translation coordination, with a
translation percentage of at least 50%.
Ready PO files en fr ja de bg es fi pl pt ru
+-------------------------------+
enlightenment | [] [] [] [] [] [] [] [] [] [] |
Some counters in the preceding matrix are higher than the number of
visible blocks let us expect. This is because a few extra PO files are
used for implementing regional variants of languages, or language
dialects.
For a PO file in the matrix above to be effective, the package to
which it applies should also have been internationalized and
distributed as such by its maintainer. There might be an observable
lag between the mere existence a PO file and its wide availability in a
distribution.
If August 2002 seems to be old, you may fetch a more recent copy of
this `ABOUT-NLS' file on most GNU archive sites. The most up-to-date
matrix with full percentage details can be found at
`http://www.iro.umontreal.ca/contrib/po/HTML/matrix.html'.
Using `gettext' in new packages
===============================
If you are writing a freely available program and want to
internationalize it you are welcome to use GNU `gettext' in your
package. Of course you have to respect the GNU Library General Public
License which covers the use of the GNU `gettext' library. This means
in particular that even non-free programs can use `libintl' as a shared
library, whereas only free software can use `libintl' as a static
library or use modified versions of `libintl'.
Once the sources are changed appropriately and the setup can handle
to use of `gettext' the only thing missing are the translations. The
Free Translation Project is also available for packages which are not
developed inside the GNU project. Therefore the information given above
applies also for every other Free Software Project. Contact
`translation@iro.umontreal.ca' to make the `.pot' files available to
the translation teams.

@ -0,0 +1 @@
Rewritten agani by Viktor 'urandom' Kojouharov <viktor@bloka.org> (version 0.1.5)

@ -0,0 +1,28 @@
Copyright (C) 2000 Viktor Kojouharov and various contributors (see AUTHORS)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies of the Software and its Copyright notices. In addition publicly
documented acknowledgment must be given that this software has been used if no
source code of this software is made available publicly. This includes
acknowledgments in either Copyright notices, Manuals, Publicity and Marketing
documents or any documentation provided with any product containing this
software. This License does not apply to any software that links to the
libraries provided by this software (statically or dynamically), but only to
the software provided.
Please see the COPYING.PLAIN for a plain-english explanation of this notice
and it's intent.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

@ -0,0 +1,33 @@
Plain English Copyright Notice
This file is not intended to be the actual License. The reason this file
exists is that we here are programmers and engineers. We aren't lawyers. We
provide licenses that we THINK say the right things, but we have our own
intentions at heart. This is a plain-english explanation of what those
intentions are, and if you follow them you will be within the "spirit" of
the license.
The intent is for us to enjoy writing software that is useful to us (the
AUTHORS) and allow others to use it freely and also benefit from the work we
put into making it. We don't want to restrict others using it. They should
not *HAVE* to make the source code of the applications they write that
simply link to these libraries (be that statically or dynamically), or for
them to be limited as to what license they choose to use (be it open, closed
or anything else). But we would like to know you are using these libraries.
We simply would like to know that it has been useful to someone. This is why
we ask for acknowledgement of some sort.
You can do what you want with the source of this software - it doesn't
matter. We still have it here for ourselves and it is open and free to use
and download and play with. It can't be taken away. We don't really mind what
you do with the source to your software. We would simply like to know that
you are using it - especially if it makes it to a commerical product. If you
simply e-mail all the AUTHORS (see COPYING and AUTHORS files) telling us, and
then make sure you include a paragraph or page in the manual for the product
with the copyright notice and state that you used this software, we will be
very happy. If you want to contribute back modifications and fixes you may have
made we will welcome those too with open arms (generally). If you want help
with changes needed, ports needed or features to be added, arrangements can
be easily made with some dialogue.
Viktor Kojouharov <viktor@bloka.org>

@ -0,0 +1,11 @@
COMPILING and INSTALLING:
If you got a official release tar archive do:
./autogen.sh
Then to compile:
make
To install:
make install

@ -0,0 +1,46 @@
MAINTAINERCLEANFILES = Makefile.in
SUBDIRS = images po
EDJE_CC = @edje_cc@
EDJE_FLAGS = -v \
-id $(top_srcdir)/images \
-fd $(top_srcdir)/fonts
# data files for the module
filesdir = $(datadir)
files_DATA = module.desktop \
module.edj \
forecasts.edj
EXTRA_DIST = $(files_DATA) \
e_modules-forecasts.spec \
forecasts.edc \
fonts/VeraBd.ttf \
fonts/vera.ttf
# 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
module_la_LIBADD = @e_libs@
module_la_LDFLAGS = -module -avoid-version
module_la_DEPENDENCIES = $(top_builddir)/config.h
%.edj: %.edc
$(EDJE_CC) $(EDJE_FLAGS) $< $@
clean-local:
rm -rf forecasts.edj *~
uninstall:
rm -rf $(datadir)

@ -0,0 +1 @@
new weather images are part of the kapsule icon pack. they should be replaced

9478
aclocal.m4 vendored

File diff suppressed because it is too large Load Diff

@ -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 forecasts.pot template"; \
xgettext \
--output forecasts.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

@ -0,0 +1,157 @@
dnl Process this file with autoconf to produce a configure script.
# get rid of that stupid cache mechanism
rm -f config.cache
AC_INIT(configure.in)
AC_CANONICAL_BUILD
AC_CANONICAL_HOST
AM_INIT_AUTOMAKE(forecasts, 0.1.5)
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")
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
module.desktop
images/Makefile
po/Makefile
e_modules-forecasts.spec
],[
])

@ -0,0 +1,149 @@
#include <e.h>
#include "e_mod_main.h"
struct _E_Config_Dialog_Data
{
double poll_time;
int display;
int degrees;
char *code;
int show_text;
};
static void *_create_data(E_Config_Dialog * cfd);
static void _free_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 void _fill_data(Config_Item * ci, E_Config_Dialog_Data * cfdata);
void
_config_forecasts_module(Config_Item * ci)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
E_Container *con;
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->override_auto_apply = 1;
snprintf(buf, sizeof(buf), "%s/module.edj",
e_module_dir_get(forecasts_config->module));
con = e_container_current_get(e_manager_current_get());
cfd =
e_config_dialog_new(con, D_("Forecasts Configuration"), "Forecasts", "_e_modules_forecasts_config_dialog", buf, 0, v, ci);
forecasts_config->config_dialog = cfd;
}
static void
_fill_data(Config_Item * ci, E_Config_Dialog_Data * cfdata)
{
cfdata->poll_time = (ci->poll_time / 60.0);
cfdata->degrees = ci->degrees;
if (ci->code)
cfdata->code = strdup(ci->code);
cfdata->show_text = ci->show_text;
}
static void *
_create_data(E_Config_Dialog * cfd)
{
E_Config_Dialog_Data *cfdata;
Config_Item *ci;
ci = cfd->data;
cfdata = E_NEW(E_Config_Dialog_Data, 1);
_fill_data(ci, cfdata);
return cfdata;
}
static void
_free_data(E_Config_Dialog * cfd, E_Config_Dialog_Data * cfdata)
{
if (!forecasts_config)
return;
forecasts_config->config_dialog = NULL;
free(cfdata);
cfdata = NULL;
}
static Evas_Object *
_basic_create_widgets(E_Config_Dialog * cfd, Evas * evas,
E_Config_Dialog_Data * cfdata)
{
Evas_Object *o, *of, *ob;
E_Radio_Group *rg, *dg;
o = e_widget_list_add(evas, 0, 0);
of = e_widget_framelist_add(evas, D_("Display Settings"), 0);
ob = e_widget_label_add(evas, D_("Poll Time"));
e_widget_framelist_object_append(of, ob);
ob =
e_widget_slider_add(evas, 1, 0, D_("%2.0f minutes"), 15.0, 60.0, 1.0, 0,
&(cfdata->poll_time), NULL, 40);
e_widget_framelist_object_append(of, ob);
ob = e_widget_check_add(evas, _("Show Description"), &(cfdata->show_text));
e_widget_framelist_object_append(of, ob);
e_widget_list_object_append(o, of, 1, 1, 0.5);
of = e_widget_framelist_add(evas, D_("Unit Settings"), 0);
dg = e_widget_radio_group_new(&(cfdata->degrees));
ob = e_widget_radio_add(evas, D_("Metric"), DEGREES_C, dg);
e_widget_framelist_object_append(of, ob);
ob = e_widget_radio_add(evas, D_("English"), DEGREES_F, dg);
e_widget_framelist_object_append(of, ob);
e_widget_list_object_append(o, of, 1, 1, 0.5);
of = e_widget_frametable_add(evas, D_("Yahoo Forecasts Code"), 0);
ob = e_widget_label_add(evas, D_("Yahoo Forecasts Code/US Zip Code"));
e_widget_frametable_object_append(of, ob, 0, 0, 1, 1, 1, 0, 1, 0);
ob = e_widget_entry_add(evas, &cfdata->code);
e_widget_min_size_set(ob, 100, 1);
e_widget_frametable_object_append(of, ob, 1, 0, 1, 1, 1, 0, 1, 0);
ob = e_widget_label_add(evas, D_("Get your Yahoo Forecasts Code code at:"));
e_widget_frametable_object_append(of, ob, 0, 1, 1, 1, 1, 0, 1, 0);
ob =
e_widget_label_add(evas, D_("http://forecasts.yahoo.com"));
e_widget_frametable_object_append(of, ob, 0, 2, 2, 1, 1, 0, 1, 0);
e_widget_list_object_append(o, of, 1, 1, 0.5);
return o;
}
static int
_basic_apply_data(E_Config_Dialog * cfd, E_Config_Dialog_Data * cfdata)
{
Config_Item *ci;
int len;
ci = cfd->data;
if (!cfdata->code)
return 0;
if (!strlen(cfdata->code))
return 0;
ci->degrees = cfdata->degrees;
ci->poll_time = (cfdata->poll_time * 60.0);
if (ci->code)
evas_stringshare_del(ci->code);
char *t;
t = strdup(cfdata->code);
*t = toupper(*t);
ci->code = evas_stringshare_add(t);
ci->show_text = cfdata->show_text;
e_config_save_queue();
_forecasts_config_updated(ci->id);
return 1;
}

@ -0,0 +1,9 @@
#ifdef E_TYPEDEFS
#else
#ifndef E_MOD_CONFIG_H
#define E_MOD_CONFIG_H
#include "e_mod_main.h"
#endif
#endif

File diff suppressed because it is too large Load Diff

@ -0,0 +1,59 @@
#define D_(str) dgettext(PACKAGE, str)
#ifndef E_MOD_MAIN_H
#define E_MOD_MAIN_H
#define DEGREES_F 0
#define DEGREES_C 1
typedef struct _Config Config;
typedef struct _Config_Item Config_Item;
typedef struct _Popup Popup;
struct _Config
{
E_Module *module;
E_Config_Dialog *config_dialog;
Evas_List *instances;
Evas_List *items;
E_Menu *menu;
};
struct _Config_Item
{
const char *id;
double poll_time;
int degrees;
const char *host, *code;
int show_text;
};
struct _Popup
{
E_Popup *win;
int w, h;
Evas_Object *o_list, *o_bg, *o_ft[3];
Evas_Object *current_desc;
Evas_Object *wind_chill, *wind_speed;
Evas_Object *icon;
Evas_Object *humidity, *visibility, *pressure, *rising;
Evas_Object *sunrise, *sunset;
Evas_Object *desc[2], *high[2], *low[2], *f_icon[2];
};
EAPI extern E_Module_Api e_modapi;
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);
void _config_forecasts_module(Config_Item *ci);
void _forecasts_config_updated(const char *id);
extern Config *forecasts_config;
#endif

@ -0,0 +1,50 @@
%define module_name forecasts
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

Binary file not shown.

Binary file not shown.

@ -0,0 +1,239 @@
fonts {
font: "vera.ttf" "Vera";
font: "VeraBd.ttf" "Vera Bold";
}
#define FORECASTS_ICON(icon_code, minw, minh, maxw, maxh, a) \
images { \
image: icon_code".png" COMP; \
} \
group { \
name: "modules/forecasts/icons/"icon_code; \
min: minw minh; \
max: maxw maxh; \
parts { \
part { \
name: "icon"; \
description { \
state: "default" 0.0; \
aspect: a a; \
aspect_preference: BOTH; \
image { \
normal: icon_code".png"; \
} \
fill { \
smooth: 1; \
} \
} \
} \
} \
}
collections {
group {
name: "modules/forecasts/main";
parts {
part {
name: "base";
type: RECT;
mouse_events: 1;
description {
state: "default" 0.0;
color: 0 0 0 0;
rel1 {
offset: 0 0;
}
rel2 {
offset: -1 -1;
}
}
}
part {
name: "icon";
type: SWALLOW;
mouse_events: 0;
description {
state: "default" 0.0;
aspect_preference: BOTH;
align: 0.0 0.0;
rel1 {
relative: 0.0 0.0;
offset: 0 0;
}
rel2 {
relative: 1.0 1.0;
offset: -1 -1;
}
color: 0 0 0 0;
}
}
part {
name: "e.text.temp";
type: TEXT;
effect: OUTLINE_SOFT_SHADOW;
mouse_events: 0;
description {
state: "default" 0.0;
rel1 {
relative: 0.0 0.0;
offset: 0 0;
to: "icon";
}
rel2 {
relative: 1.0 1.0;
offset: -1 -1;
to: "icon";
}
color: 255 255 255 255;
color2: 0 0 0 96;
color3: 0 0 0 32;
color_class: "module_label";
text {
text: "";
font: "Vera Bold";
size: 10;
min: 1 1;
align: 0.0 0.1;
text_class: "module_large";
}
}
}
part {
name: "e.text.description";
type: TEXT;
effect: OUTLINE_SOFT_SHADOW;
mouse_events: 0;
description {
state: "default" 0.0;
rel1 {
relative: 0.0 1.0;
offset: -1 -1;
to_x: "icon";
}
rel2 {
relative: 1.0 1.0;
offset: -1 -10;
}
color: 255 255 255 255;
color2: 0 0 0 96;
color3: 0 0 0 32;
color_class: "module_label";
text {
text: "";
font: "Vera Bold";
size: 8;
min: 1 1;
align: 0.5 0.5;
text_class: "module_normal";
}
}
description {
state: "hidden" 0.0;
inherit: "default" 0.0;
visible: 0;
}
}
}
programs {
program {
name: "text_hide";
signal: "e,state,description,hide";
source: "e";
action: STATE_SET "hidden" 0.0;
target: "e.text.description";
}
program {
name: "text_show";
signal: "e,state,description,show";
source: "e";
action: STATE_SET "default" 0.0;
target: "e.text.description";
}
}
}
group {
name: "modules/forecasts/popup";
parts {
part {
name: "base";
type: RECT;
mouse_events: 0;
description {
state: "default" 0.0;
rel1 {
offset: 0 0;
}
rel2 {
offset: -1 -1;
}
color: 221 221 221 255;
}
}
part {
name: "e.swallow.content";
type: SWALLOW;
description {
state: "default" 0.0;
align: 0.5 0.5;
color: 0 0 0 0;
rel1 {
offset: 5 5;
}
rel2 {
offset: -6 -6;
}
}
}
}
}
FORECASTS_ICON(0, 40, 40, 86, 86, 1.0)
FORECASTS_ICON(1, 40, 40, 86, 86, 1.0)
FORECASTS_ICON(2, 40, 40, 86, 86, 1.0)
FORECASTS_ICON(3, 40, 40, 86, 86, 1.0)
FORECASTS_ICON(4, 40, 40, 86, 86, 1.0)
FORECASTS_ICON(5, 40, 40, 86, 86, 1.0)
FORECASTS_ICON(6, 40, 40, 86, 86, 1.0)
FORECASTS_ICON(7, 40, 40, 86, 86, 1.0)
FORECASTS_ICON(8, 40, 40, 86, 86, 1.0)
FORECASTS_ICON(9, 40, 40, 86, 86, 1.0)
FORECASTS_ICON(10, 40, 40, 86, 86, 1.0)
FORECASTS_ICON(11, 40, 40, 86, 86, 1.0)
FORECASTS_ICON(12, 40, 40, 86, 86, 1.0)
FORECASTS_ICON(13, 40, 40, 86, 86, 1.0)
FORECASTS_ICON(14, 40, 40, 86, 86, 1.0)
FORECASTS_ICON(15, 40, 40, 86, 86, 1.0)
FORECASTS_ICON(16, 40, 40, 86, 86, 1.0)
FORECASTS_ICON(17, 40, 40, 86, 86, 1.0)
FORECASTS_ICON(18, 40, 40, 86, 86, 1.0)
FORECASTS_ICON(19, 40, 40, 86, 86, 1.0)
FORECASTS_ICON(20, 40, 40, 86, 86, 1.0)
FORECASTS_ICON(21, 40, 40, 86, 86, 1.0)
FORECASTS_ICON(22, 40, 40, 86, 86, 1.0)
FORECASTS_ICON(23, 40, 40, 86, 86, 1.0)
FORECASTS_ICON(24, 40, 40, 86, 86, 1.0)
FORECASTS_ICON(25, 40, 40, 86, 86, 1.0)
FORECASTS_ICON(26, 40, 40, 86, 86, 1.0)
FORECASTS_ICON(27, 40, 40, 86, 86, 1.0)
FORECASTS_ICON(28, 40, 40, 86, 86, 1.0)
FORECASTS_ICON(29, 40, 40, 86, 86, 1.0)
FORECASTS_ICON(30, 40, 40, 86, 86, 1.0)
FORECASTS_ICON(31, 40, 40, 86, 86, 1.0)
FORECASTS_ICON(32, 40, 40, 86, 86, 1.0)
FORECASTS_ICON(33, 40, 40, 86, 86, 1.0)
FORECASTS_ICON(34, 40, 40, 86, 86, 1.0)
FORECASTS_ICON(35, 40, 40, 86, 86, 1.0)
FORECASTS_ICON(36, 40, 40, 86, 86, 1.0)
FORECASTS_ICON(37, 40, 40, 86, 86, 1.0)
FORECASTS_ICON(38, 40, 40, 86, 86, 1.0)
FORECASTS_ICON(39, 40, 40, 86, 86, 1.0)
FORECASTS_ICON(40, 40, 40, 86, 86, 1.0)
FORECASTS_ICON(41, 40, 40, 86, 86, 1.0)
FORECASTS_ICON(42, 40, 40, 86, 86, 1.0)
FORECASTS_ICON(43, 40, 40, 86, 86, 1.0)
FORECASTS_ICON(44, 40, 40, 86, 86, 1.0)
FORECASTS_ICON(45, 40, 40, 86, 86, 1.0)
FORECASTS_ICON(46, 40, 40, 86, 86, 1.0)
FORECASTS_ICON(47, 40, 40, 86, 86, 1.0)
FORECASTS_ICON(3200, 40, 40, 86, 86, 1.0)
}

@ -0,0 +1,2 @@
Makefile
Makefile.in

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

@ -0,0 +1,52 @@
MAINTAINERCLEANFILES = Makefile.in
EXTRA_DIST = \
0.png \
1.png \
2.png \
3.png \
4.png \
5.png \
6.png \
7.png \
8.png \
9.png \
10.png \
11.png \
12.png \
13.png \
14.png \
15.png \
16.png \
17.png \
18.png \
19.png \
20.png \
21.png \
22.png \
23.png \
24.png \
25.png \
26.png \
27.png \
28.png \
29.png \
30.png \
31.png \
32.png \
33.png \
34.png \
35.png \
36.png \
37.png \
38.png \
39.png \
40.png \
41.png \
42.png \
43.png \
44.png \
45.png \
46.png \
47.png \
3200.png

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

Binary file not shown.

@ -0,0 +1,4 @@
Makefile
Makefile.in
*.pot
*.mo

@ -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; \