Browse Source

init

master
Mike Blumenkrantz 8 years ago
commit
8fbb4723cc
  1. 48
      .gitignore
  2. 1
      AUTHORS
  3. 25
      COPYING
  4. 0
      ChangeLog
  5. 70
      Makefile.am
  6. 0
      NEWS
  7. 0
      README
  8. 17
      autogen.sh
  9. 77
      configure.ac
  10. 47
      e_modules-wallpaper2.spec.in
  11. 33
      module.desktop.in
  12. 0
      po/LINGUAS
  13. 42
      po/Makevars
  14. 3
      po/POTFILES.in
  15. 74
      po/wallpaper2.pot
  16. 21
      src/Makefile.am
  17. 1352
      src/e_int_config_wallpaper.c
  18. 97
      src/e_mod_main.c
  19. 34
      src/e_mod_main.h

48
.gitignore vendored

@ -0,0 +1,48 @@
*~
*.swo
*.swp
*.o
*.lo
*.la
ABOUT-NLS
INSTALL
Makefile
Makefile.in
aclocal.m4
autom4te.cache/
config.guess
config.h
config.h.in
config.log
config.rpath
config.status
config.sub
configure
configure.ac.orig
depcomp
e_modules-*.spec
install-sh
libtool
ltmain.sh
*.m4
missing
mkinstalldirs
module.desktop
po/Makefile
po/Makefile.in
po/Makefile.in.in
po/Makevars.template
po/POTFILES
po/Rules-quot
po/*.gmo
po/boldquot.sed
po/en@boldquot.header
po/en@quot.header
po/insert-header.sin
po/quot.sed
po/remove-potcdate.sed
po/remove-potcdate.sin
po/stamp-po
src/.deps/
src/.libs/
stamp-h1

1
AUTHORS

@ -0,0 +1 @@
The Rasterman (Carsten Haitzler) <raster@rasterman.com>

25
COPYING

@ -0,0 +1,25 @@
Copyright notice for Enlightenment:
Copyright (C) 2000-2012 Carsten Haitzler and various contributors (see AUTHORS)
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

70
Makefile.am

@ -0,0 +1,70 @@
ACLOCAL_AMFLAGS = -I m4
MAINTAINERCLEANFILES = \
m4/libtool.m4 \
m4/wchar_t.m4 \
m4/uintmax_t.m4 \
m4/inttypes-pri.m4 \
m4/xsize.m4 \
m4/longdouble.m4 \
m4/nls.m4 \
m4/lt~obsolete.m4 \
m4/wint_t.m4 \
m4/isc-posix.m4 \
m4/printf-posix.m4 \
m4/po.m4 \
m4/signed.m4 \
m4/lcmessage.m4 \
m4/intmax.m4 \
m4/ltoptions.m4 \
m4/ulonglong.m4 \
m4/progtest.m4 \
m4/glibc21.m4 \
m4/inttypes.m4 \
m4/codeset.m4 \
m4/stdint_h.m4 \
m4/ltsugar.m4 \
m4/longlong.m4 \
m4/inttypes_h.m4 \
m4/lib-ld.m4 \
m4/lib-link.m4 \
m4/gettext.m4 \
m4/size_max.m4 \
m4/ltversion.m4 \
m4/lib-prefix.m4 \
m4/iconv.m4 \
m4/intdiv0.m4 \
Makefile.in \
aclocal.m4 \
config.guess \
config.h.in \
config.sub \
configure \
depcomp \
install-sh \
ltmain.sh \
missing \
module.\
desktop \
config.rpath \
mkinstalldirs
SUBDIRS = src
if HAVE_PO
SUBDIRS += po
endif
filesdir = $(module_dir)/$(PACKAGE)
files_DATA = module.desktop
EXTRA_DIST = module.desktop.in
clean-local:
rm -rf *.edj module.desktop *~
uninstall-local:
rm -rf $(DESTDIR)$(module_dir)/$(PACKAGE)

17
autogen.sh

@ -0,0 +1,17 @@
#!/bin/sh
rm -rf autom4te.cache
rm -f aclocal.m4 ltmain.sh
touch README
echo "Running autopoint..." ; autopoint -f || :
echo "Running aclocal..." ; aclocal -I m4 $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
if [ -z "$NOCONFIGURE" ]; then
./configure "$@"
fi

77
configure.ac

@ -0,0 +1,77 @@
dnl Process this file with autoconf to produce a configure script.
# get rid of that stupid cache mechanism
rm -f config.cache
AC_INIT(wallpaper2, 0.1, enlightenment-devel@lists.sourceforge.net)
AC_CONFIG_MACRO_DIR([m4])
AC_PREREQ(2.52)
AC_CONFIG_SRCDIR(configure.ac)
AC_CANONICAL_BUILD
AC_CANONICAL_HOST
AC_ISC_POSIX
AM_INIT_AUTOMAKE([1.8 dist-bzip2])
AM_CONFIG_HEADER(config.h)
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AC_PROG_CC
AM_PROG_CC_STDC
define([AC_LIBTOOL_LANG_CXX_CONFIG], [:])dnl
define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl
AC_PROG_LIBTOOL
m4_ifdef([AM_GNU_GETTEXT_VERSION], [
AM_GNU_GETTEXT_VERSION([0.14])
])
m4_ifdef([AM_GNU_GETTEXT], [
AM_GNU_GETTEXT([external])
po_makefile_in=po/Makefile.in
AM_CONDITIONAL([HAVE_PO], [true])
],[
AM_CONDITIONAL([HAVE_PO], [false])
])
AC_SUBST(LTLIBINTL)
PKG_CHECK_MODULES([E], [enlightenment > 0.18.99])
release=$(pkg-config --variable=release enlightenment)
MODULE_ARCH="$host_os-$host_cpu-$release"
AC_SUBST(MODULE_ARCH)
AC_DEFINE_UNQUOTED(MODULE_ARCH, "$MODULE_ARCH", "Module architecture")
module_dir="$(pkg-config --variable=modules enlightenment)"
AC_SUBST(module_dir)
datadir="$module_dir/wallpaper2"
# Find edje_cc
##AC_ARG_WITH(edje-cc,
## AC_HELP_STRING([--with-edje-cc=PATH], [specify a specific path to edje_cc]),
## [
## v=$withval;
## EDJE_CC=$v
## ],[
## EDJE_CC=$(pkg-config --variable=prefix edje)/bin/edje_cc
## ]
##)
##AC_SUBST(EDJE_CC)
##AC_MSG_CHECKING([Which edje_cc to use])
##AC_MSG_RESULT(${EDJE_CC})
m4_ifdef([v_mic],
[
EFL_COMPILER_FLAG([-Wshadow])
EFL_COMPILER_FLAG([-Wall])
EFL_COMPILER_FLAG([-Wpointer-arith])
EFL_COMPILER_FLAG([-W])
EFL_COMPILER_FLAG([-Wno-missing-field-initializers])
])
AC_OUTPUT([
Makefile
src/Makefile
module.desktop
$po_makefile_in
], [
])

47
e_modules-wallpaper2.spec.in

@ -0,0 +1,47 @@
%define module_name wallpaper2
%{!?_rel:%{expand:%%global _rel 0.enl%{?dist}}}
Summary: %{module_name} module for the Enlightenment window manager
Name: e_modules-%{module_name}
Version: @VERSION@
Release: %{_rel}
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: enlightenment-devel >= 0.18.999
Requires: enlightenment >= 0.18.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
%{_libdir}/enlightenment/modules/%{module_name}*
%changelog

33
module.desktop.in

@ -0,0 +1,33 @@
[Desktop Entry]
Encoding=UTF-8
Type=Link
Name=Wallpaper 2
Name[ca]=Fons d'escriptori
Name[cs]=Pozadí plochy
Name[eo]=Tapeto
Name[es]=Fondo de pantalla
Name[fr]=Fond d'écran 2
Name[gl]=Fondo de escritorio 2
Name[hu]=Háttérkép
Name[it]=Sfondo 2
Name[ms]=Kertas Dinding 2
Name[pt]=Papel de parede 2
Name[ru]=Обои 2
Name[sr]=Позадина површи 2
Name[tr]=Duvarkağıdı 2
Comment=Used to pick a wallpaper.
Comment[ca]=Permet seleccionar el fons d'escriptori.
Comment[cs]=Použit k volbě pozadí.
Comment[eo]=Elekti tapeton.
Comment[es]=Para elegir un fondo de pantalla.
Comment[fr]=Sélection du fond d'écran.
Comment[gl]=Usado para escoller un fondo de pantalla.
Comment[hu]=Háttérkép beállító modul.
Comment[it]=Usato per selezionare uno sfondo.
Comment[ms]=Digunakan untuk mendapatkan kertas dinding.
Comment[pt]=Permite-lhe escolher o papel de parede
Comment[ru]=Используется для выбора обоев.
Comment[sr]=Користи се за одабир слике радне површи.
Comment[tr]=Duvarkağıdı seçiminde kullanılır.
Icon=preferences-desktop-wallpaper
X-Enlightenment-ModuleType=settings

0
po/LINGUAS

42
po/Makevars

@ -0,0 +1,42 @@
# Makefile variables for PO directory in any package using GNU gettext.
# Usually the message domain is the same as the package name.
DOMAIN = $(PACKAGE)
# These two variables depend on the location of this directory.
subdir = po
top_builddir = ..
# These options get passed to xgettext.
XGETTEXT_OPTIONS = --keyword=N_ --keyword=D_ --keyword=DP_:1,2 \
--from-code=UTF-8 --foreign-user
# This is the copyright holder that gets inserted into the header of the
# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
# package. (Note that the msgstr strings, extracted from the package's
# sources, belong to the copyright holder of the package.) Translators are
# expected to transfer the copyright for their translations to this person
# or entity, or to disclaim their copyright. The empty string stands for
# the public domain; in this case the translators are expected to disclaim
# their copyright.
COPYRIGHT_HOLDER = Enlightenment development team
# This is the email address or URL to which the translators shall report
# bugs in the untranslated strings:
# - Strings which are not entire sentences, see the maintainer guidelines
# in the GNU gettext documentation, section 'Preparing Strings'.
# - Strings which use unclear terms or require additional context to be
# understood.
# - Strings which make invalid assumptions about notation of date, time or
# money.
# - Pluralisation problems.
# - Incorrect English spelling.
# - Incorrect formatting.
# It can be your email address, or a mailing list address where translators
# can write to without being subscribed, or the URL of a web page through
# which the translators can contact you.
MSGID_BUGS_ADDRESS = enlightenment-devel@lists.sourceforge.net
# This is the list of locale categories, beyond LC_MESSAGES, for which the
# message catalogs shall be used. It is usually empty.
EXTRA_LOCALE_CATEGORIES =

3
po/POTFILES.in

@ -0,0 +1,3 @@
src/e_int_config_wallpaper.c
src/e_mod_main.c
src/e_mod_main.h

74
po/wallpaper2.pot

@ -0,0 +1,74 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR Enlightenment development team
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: enlightenment-devel@lists.sourceforge.net\n"
"POT-Creation-Date: 2014-06-17 09:26-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: src/e_int_config_wallpaper.c:723 src/e_int_config_wallpaper.c:916
msgid "Theme Wallpaper"
msgstr ""
#: src/e_int_config_wallpaper.c:1106
msgid "Loading files..."
msgstr ""
#: src/e_int_config_wallpaper.c:1174
msgid "Wallpaper Settings"
msgstr ""
#: src/e_int_config_wallpaper.c:1189
msgid "OK"
msgstr ""
#: src/e_int_config_wallpaper.c:1195
msgid "Apply"
msgstr ""
#: src/e_int_config_wallpaper.c:1201
msgid "Close"
msgstr ""
#: src/e_int_config_wallpaper.c:1252
msgid "All Desktops"
msgstr ""
#: src/e_int_config_wallpaper.c:1258
msgid "This Desktop"
msgstr ""
#: src/e_int_config_wallpaper.c:1263
msgid "This Screen"
msgstr ""
#: src/e_int_config_wallpaper.c:1276
msgid "Add"
msgstr ""
#: src/e_int_config_wallpaper.c:1281
msgid "Delete"
msgstr ""
#: src/e_mod_main.c:25
msgid "Look"
msgstr ""
#: src/e_mod_main.c:26 src/e_mod_main.c:30 src/e_mod_main.c:94
msgid "Wallpaper 2"
msgstr ""
#: src/e_mod_main.c:27
msgid "Internal"
msgstr ""

21
src/Makefile.am

@ -0,0 +1,21 @@
MAINTAINERCLEANFILES = Makefile.in
AM_CPPFLAGS = -I. \
-I$(top_srcdir) \
-I$(includedir) \
-DLOCALEDIR=\"$(datadir)/locale\" \
-DPACKAGE_DATA_DIR=\"$(module_dir)/$(PACKAGE)\" \
@E_CFLAGS@
pkgdir = $(module_dir)/$(PACKAGE)/$(MODULE_ARCH)
pkg_LTLIBRARIES = module.la
module_la_SOURCES = e_mod_main.h \
e_mod_main.c \
e_int_config_wallpaper.c
module_la_LIBADD = @E_LIBS@
module_la_LDFLAGS = -module -avoid-version
module_la_DEPENDENCIES = $(top_builddir)/config.h
clean-local:
rm -rf *~

1352
src/e_int_config_wallpaper.c

File diff suppressed because it is too large Load Diff

97
src/e_mod_main.c

@ -0,0 +1,97 @@
#include "e.h"
#include "e_mod_main.h"
/* actual module specifics */
static void _e_mod_run_cb(void *data, E_Menu *m, E_Menu_Item *mi);
static void _e_mod_menu_add(void *data, E_Menu *m);
static E_Module *conf_module = NULL;
static E_Int_Menu_Augmentation *maug = NULL;
//static E_Fm2_Mime_Handler *import_hdl = NULL;
/* module setup */
EAPI E_Module_Api e_modapi =
{
E_MODULE_API_VERSION,
"Settings - Wallpaper 2"
};
EAPI void *
e_modapi_init(E_Module *m)
{
bindtextdomain(PACKAGE, LOCALEDIR);
bind_textdomain_codeset(PACKAGE, "UTF-8");
e_configure_registry_category_add("appearance", 10, D_("Look"), NULL, "preferences-look");
e_configure_registry_item_add("appearance/wallpaper2", 10, D_("Wallpaper 2"), NULL, "preferences-desktop-wallpaper", wp_conf_show);
e_configure_registry_category_add("internal", -1, D_("Internal"), NULL, "enlightenment/internal");
// e_configure_registry_item_add("internal/wallpaper_desk", -1, D_("Wallpaper 2"), NULL, "preferences-system-windows", e_int_config_wallpaper_desk);
maug = e_int_menus_menu_augmentation_add_sorted
("config/1", D_("Wallpaper 2"), _e_mod_menu_add, NULL, NULL, NULL);
// import_hdl = e_fm2_mime_handler_new(_("Set As Background 2"), "preferences-desktop-wallpaper",
// e_int_config_wallpaper_handler_set, NULL,
// e_int_config_wallpaper_handler_test, NULL);
// if (import_hdl)
// {
// e_fm2_mime_handler_mime_add(import_hdl, "image/png");
// e_fm2_mime_handler_mime_add(import_hdl, "image/jpeg");
// }
conf_module = m;
e_module_delayed_set(m, 1);
return m;
}
EAPI int
e_modapi_shutdown(E_Module *m EINA_UNUSED)
{
// E_Config_Dialog *cfd;
/* remove module-supplied menu additions */
if (maug)
{
e_int_menus_menu_augmentation_del("config/1", maug);
maug = NULL;
}
// while ((cfd = e_config_dialog_get("E", "appearance/wallpaper2")))
// e_object_del(E_OBJECT(cfd));
// e_configure_registry_item_del("internal/wallpaper_desk");
e_configure_registry_category_del("internal");
e_configure_registry_item_del("appearance/wallpaper2");
e_configure_registry_category_del("appearance");
// if (import_hdl)
// {
// e_fm2_mime_handler_mime_del(import_hdl, "image/png");
// e_fm2_mime_handler_mime_del(import_hdl, "image/jpeg");
// e_fm2_mime_handler_free(import_hdl);
// }
conf_module = NULL;
return 1;
}
EAPI int
e_modapi_save(E_Module *m EINA_UNUSED)
{
return 1;
}
/* menu item callback(s) */
static void
_e_mod_run_cb(void *data EINA_UNUSED, E_Menu *m, E_Menu_Item *mi EINA_UNUSED)
{
e_configure_registry_call("appearance/wallpaper2", m->zone->comp, NULL);
}
/* menu item add hook */
static void
_e_mod_menu_add(void *data EINA_UNUSED, E_Menu *m)
{
E_Menu_Item *mi;
mi = e_menu_item_new(m);
e_menu_item_label_set(mi, D_("Wallpaper 2"));
e_util_menu_item_theme_icon_set(mi, "preferences-desktop-wallpaper");
e_menu_item_callback_set(mi, _e_mod_run_cb, NULL);
}

34
src/e_mod_main.h

@ -0,0 +1,34 @@
#ifndef E_MOD_MAIN_H
#define E_MOD_MAIN_H
#ifdef ENABLE_NLS
# include <libintl.h>
# define D_(str) dgettext(PACKAGE, str)
# define DP_(str, str_p, n) dngettext(PACKAGE, str, str_p, n)
#else
# define bindtextdomain(domain,dir)
# define bind_textdomain_codeset(domain,codeset)
# define D_(str) (str)
# define DP_(str, str_p, n) (str_p)
#endif
#define N_(str) (str)
E_Config_Dialog *wp_conf_show(E_Comp *comp, const char *params);
void wp_conf_hide(void);
/**
* @addtogroup Optional_Conf
* @{
*
* @defgroup Module_Conf_Wallpaper2 Wallpaper2 (Alternative Selector)
*
* More graphically appealing wallpaper selector. It is targeted at
* mobile devices.
*
* @note under development and not recommended for use yet.
*
* @see Module_Conf_Theme
* @}
*/
#endif
Loading…
Cancel
Save