diff --git a/pyphone/DejaVuSans-Bold.ttf b/pyphone/DejaVuSans-Bold.ttf new file mode 100644 index 0000000..5fbc067 Binary files /dev/null and b/pyphone/DejaVuSans-Bold.ttf differ diff --git a/pyphone/DejaVuSansMono-Bold.ttf b/pyphone/DejaVuSansMono-Bold.ttf new file mode 100644 index 0000000..5b030fb Binary files /dev/null and b/pyphone/DejaVuSansMono-Bold.ttf differ diff --git a/pyphone/DejaVuSansMono.ttf b/pyphone/DejaVuSansMono.ttf new file mode 100644 index 0000000..006c1b3 Binary files /dev/null and b/pyphone/DejaVuSansMono.ttf differ diff --git a/pyphone/VeraBd.ttf b/pyphone/VeraBd.ttf new file mode 100644 index 0000000..51d6111 Binary files /dev/null and b/pyphone/VeraBd.ttf differ diff --git a/pyphone/background.png b/pyphone/background.png new file mode 100644 index 0000000..e84809a Binary files /dev/null and b/pyphone/background.png differ diff --git a/pyphone/button_background.png b/pyphone/button_background.png new file mode 100644 index 0000000..9424b00 Binary files /dev/null and b/pyphone/button_background.png differ diff --git a/pyphone/button_background_active.png b/pyphone/button_background_active.png new file mode 100644 index 0000000..a0dc167 Binary files /dev/null and b/pyphone/button_background_active.png differ diff --git a/pyphone/button_contacts.png b/pyphone/button_contacts.png new file mode 100644 index 0000000..3f083ae Binary files /dev/null and b/pyphone/button_contacts.png differ diff --git a/pyphone/button_main_background.png b/pyphone/button_main_background.png new file mode 100644 index 0000000..b69aeff Binary files /dev/null and b/pyphone/button_main_background.png differ diff --git a/pyphone/button_main_background_active.png b/pyphone/button_main_background_active.png new file mode 100644 index 0000000..1a41eae Binary files /dev/null and b/pyphone/button_main_background_active.png differ diff --git a/pyphone/button_phone.png b/pyphone/button_phone.png new file mode 100644 index 0000000..1bd2707 Binary files /dev/null and b/pyphone/button_phone.png differ diff --git a/pyphone/button_power.png b/pyphone/button_power.png new file mode 100644 index 0000000..5b9a7d3 Binary files /dev/null and b/pyphone/button_power.png differ diff --git a/pyphone/button_sms.png b/pyphone/button_sms.png new file mode 100644 index 0000000..b520a84 Binary files /dev/null and b/pyphone/button_sms.png differ diff --git a/pyphone/easy_e17.sh b/pyphone/easy_e17.sh new file mode 100755 index 0000000..2946bb1 --- /dev/null +++ b/pyphone/easy_e17.sh @@ -0,0 +1,1286 @@ +#!/usr/bin/env bash + +############################################################################# +# This script is based on the very good prework from trickster. # +# It is a result of the work from the people from #e.de (irc.freenode.net). # +# It will checkout the cvs and compile e17. # +# # +# License: BSD licence # +# Get the latest version at http://omicron.homeip.net/projects/#easy_e17.sh # +# Rewrite by morlenxus (morlenxus@gmx.net) # +# # +last_changes="2007-11-27" # +version="1.1.5" # +############################################################################# + + +# Edit these variables if you like: +install_path="/opt/e17" +cvs_path="$HOME/e17_cvs" +tmp_path="/tmp/easy_e17" +logs_path="$tmp_path/install_logs" +cvs_srv=":pserver:anonymous@anoncvs.enlightenment.org:/var/cvs/e"; +conf_file="$HOME/.easy_e17.conf" + +efl="imlib2 edb eet evas ecore efreet epeg embryo edje epsilon esmart emotion engrave etk etk_extra ewl exml enhance e_dbus" +apps="e entrance eclair evfs edje_viewer edje_editor elicit elitaire emphasis empower engycad entrance_edit_gui entropy ephoto estickies exhibit expedite exquisite extrackt e_phys" +apps_misc="enthrall rage scrot" +e17_modules="alarm bling calendar cpu deskshow emu flame forecasts language mail mem mixer moon net news penguins photo rain screenshot slideshow snow taskbar tclock uptime weather winselector wlan" + +autogen_args="" # evas:--enable-gl-x11 +linux_distri="" # if your distribution is wrongly detected, define it here +max_backoff=360 # Actual maximum backoff time is roughly this number in seconds. +nice_level=0 # nice level (19 == low, -20 == high) +os=$(uname) # operating system +threads=2 # make -j + +# URL of latest stable release +online_source="http://omicron.homeip.net/projects/easy_e17/easy_e17.sh" + + +############################################################################# +function logo () +{ + clear + echo -e "\033[1m-------------------------------\033[7m Easy_e17.sh $version \033[0m\033[1m------------------------------\033[0m" + echo -e "\033[1m Developers:\033[0m Brian 'morlenxus' Miculcy" + echo -e " David 'onefang' Seikel" + echo -e "\033[1m Contributors:\033[0m Tim 'wtfoo' Zebulla" + echo -e " Daniel G. '_ke' Siegel" + echo -e " Stefan 'slax' Langner" + echo -e " Massimiliano 'Massi' Calamelli" + echo -e " Thomas 'thomasg' Gstaedtner" + echo -e "\033[1m--------------------------------------------------------------------------------\033[0m" + echo -e "\033[1m Updates:\033[0m http://omicron.homeip.net/projects/#easy_e17.sh" + echo -e "\033[1m Support:\033[0m #e.de, #get-e (irc.freenode.net)" + echo -e " morlenxus@gmx.net" + echo -e "\033[1m Patches:\033[0m Generally accepted, please contact me!" + echo -e "\033[1m--------------------------------------------------------------------------------\033[0m" + echo + echo + echo -e "\033[1m-----------------------------\033[7m Current Configuration \033[0m\033[1m----------------------------\033[0m" + echo " Install path: $install_path" + echo " CVS path: $cvs_path" + echo " CVS server: $cvs_srv" + echo " Logs path: $logs_path" + if [ "$linux_distri" ]; then + echo " OS: $os (Distribution: $linux_distri)" + else + echo " OS: $os" + fi + echo + echo " Libraries: $efl" + echo " Applications: $apps" + echo " Miscellaneous: $apps_misc" + echo " Modules: $e17_modules" + if [ "$skip" ]; then + echo " Skipping: $skip" + fi + if [ "$only" ]; then + echo " Only: $only" + fi + echo + if [ "$fullcvs" ]; then + echo " Full cvs: yes" + fi + if [ "$skip_cvsupdate" ]; then + echo " Skip cvs update: yes" + fi + if [[ clean -eq 1 ]] ; then + echo " Run clean: yes" + fi + if [[ clean -eq 2 ]] ; then + echo " Run distclean: yes" + fi + if [[ clean -ge 3 ]] ; then + echo " Run uninstall: yes" + fi + if [ "$skip_errors" ]; then + echo " Skip errors: yes" + fi + if [ "$gen_docs" ]; then + echo " Generate docs: yes" + fi + if [ "$easy_e17_post_script" ]; then + echo " Post install: $easy_e17_post_script" + fi + if [ "$autogen_args" ]; then + echo " Autogen args: $autogen_args" + fi + if [ "$wait" ]; then + echo " Wait on exit: yes" + fi + if [ "$keep" ]; then + echo " Keep tempdir: yes" + fi + if [ "$accache" ]; then + echo " Use caches: yes" + fi + if [ "$threads" -ne 2 ]; then + echo " Threads: $threads" + fi + if [ "$nice_level" -ne 0 ]; then + echo " Nice level: $nice_level" + fi + if [ -z "$action" ]; then + action="MISSING!" + fi + echo " Script action: $action" + echo -e "\033[1m--------------------------------------------------------------------------------\033[0m" + echo + + if [ "$action" == "script" ]; then + return + fi + + if [ $1 == 0 ]; then + if [ "$2" ]; then + echo -e "\033[1m-------------------------------\033[7m Bad script argument \033[0m\033[1m----------------------------\033[0m" + echo -e " \033[1m$2\033[0m" + fi + else + echo -e "\033[1m--------------------------------\033[7m Build phase $1/3 \033[0m\033[1m-------------------------------\033[0m" + fi + + if [ -z "$2" ]; then + case $1 in + 0) + if [ "$os" == "not supported" ]; then + echo -e "\033[1m-------------------------------\033[7m Not supported OS \033[0m\033[1m------------------------------\033[0m" + echo " Your operating system '$(uname)' is not supported by this script." + echo " If possible please provide a patch." + else if [ -z "$fullhelp" ]; then + echo -e "\033[1m-----------------\033[7m Short help 'easy_e17.sh ' \033[0m\033[1m---------------\033[0m" + echo " -i, --install = action: compile and install ALL of e17" + echo " -u, --update = action: update your installed e17" + echo " --help = full help" + else + echo -e "\033[1m-----------------\033[7m Full help 'easy_e17.sh ' \033[0m\033[1m----------------\033[0m" + echo -e " \033[1mACTION (ONLY ONE SELECTION POSSIBLE):\033[0m" + echo " -i, --install = action: compile and install ALL of e17" + echo " -u, --update = action: update your installed e17" + echo " -c, --clean = action: clean the sources" + echo " (more --cleans means more cleaning, up" + echo " to a maximum of three, which will" + echo " uninstall e17." + echo " If used with one of the other actions," + echo " this will clean first.)" + echo " --only=,,... = action: checkout and compile ONLY the" + echo " named libs/apps" + echo " --cvsupdate = update only the cvs tree" + echo " -v, --check-script-version = check for a newer release of easy_e17" + echo " --help = this help" + echo + echo -e " \033[1mOPTIONS:\033[0m" + echo " --conf= = use an alternate configuration file" + echo " --instpath= = change the default install path" + echo " --cvspath= = change the default cvs path" + echo " --cvssrv= = change the default cvs server" + echo " --asuser = do everything as the user, not as root" + echo " --fullcvs = checkout optional cvs repositories:" + echo " - devs" + echo " - web" + echo " -s, --skip-cvsupdate = no update for your local cvs copy" + echo " -f, --fix-cvs-conflicts = deletes conflicting cvs files" + echo " --skip=,,... = this will skip installing the named" + echo " libs/apps" + echo " -d, --docs = generate programmers documentation" + echo " --postscript= = full path to a script to run as root" + echo " after installation" + echo " -e, --skip-errors = continue compiling even if there is" + echo " an error" + echo " -w, --wait = don't exit the script after finishing," + echo " this allows 'xterm -e ./easy_e17.sh -i'" + echo " without closing the xterm" + echo " -k, --keep = don't delete the temporary dir" + echo + echo " -l, --low = use lowest nice level (19, slowest," + echo " takes more time to compile, select" + echo " this if you need to work on the pc" + echo " while compiling)" + echo " --normal = default nice level ($nice_level)," + echo " will be automatically used" + echo " -h, --high = use highest nice level (-20, fastest," + echo " slows down the pc)" + echo " --cache = Use a common configure cache and" + echo " ccache if available" + echo " --threads= = make can use threads, recommended on smp" + echo " systems (default: 2 threads)" + echo + echo " --efl=,,... = compile libraries in this order" + echo " --apps=,... = compile e17 applications in this order" + echo " --apps_misc=,... = compile e17 misc in this order" + echo " --e17_modules=,... = compile e17 modules in this order" + echo " --autogen_args=:+,. = pass some options to autogen:" + echo " :+,:+..." + echo " --cflags=,,... = pass cflags to the gcc" + echo -e "\033[1m--------------------------------------------------------------------------------\033[0m" + echo + echo -e "\033[1m----------------------\033[7m Configurationfile '~/.easy_e17.conf' \033[0m\033[1m--------------------\033[0m" + echo " Just create this file and save your favourite arguments." + echo " Example: If you use a diffent cvs path, add this line:" + echo " --cvspath=/home/brian.miculcy/enlightenment/e17_cvs" + fi fi + ;; + 1) + echo "- running some basic system checks" + echo "- pre cleaning" + echo "- cvs checkout/update" + ;; + 2) + echo "- lib-compilation and installation" + echo "- apps-compilation and installation" + ;; + 3) + echo "- cleaning" + echo "- install notes" + ;; + esac + fi + echo -e "\033[1m--------------------------------------------------------------------------------\033[0m" + echo + echo +} + +function define_os_vars () +{ + case $os in + SunOS) + ldconfig="$(which crle) -u" # there is no command like ldconfig on solaris! "crle" does nearly the same. + make="make" + export CFLAGS="$CFLAGS" + ;; + Linux) + ldconfig="/sbin/ldconfig" + make="make" + export CFLAGS="$CFLAGS" + + if [ -z "$linux_distri" ]; then + if [ -e "/etc/debian_version" ]; then linux_distri="debian"; fi + if [ -e "/etc/gentoo-release" ]; then linux_distri="gentoo"; fi + if [ -e "/etc/redhat-release" ]; then linux_distri="redhat"; fi + if [ -e "/etc/SuSE-release" ]; then linux_distri="suse"; fi + fi + ;; + FreeBSD) + ldconfig="/sbin/ldconfig" + make="gmake" + export PATH=/usr/local/gnu-autotools/bin:$PATH + export ACLOCAL_FLAGS=" -I /usr/local/share/aclocal" + export CFLAGS="$CFLAGS -lintl -liconv -L/usr/local/lib -L/usr/X11R6/lib -I/usr/local/include -I/usr/X11R6/include" + export CPPFLAGS="$CPPFLAGS -I/usr/local/include" + ;; + *) + os="not supported" + logo 0 + exit + ;; + esac +} + +function find_path () +{ + basedir="$cvs_path/$1" + name=$2 + path="" + for dir in `find "$basedir" -type d -name "$name" | awk -F "$cvs_path/" '{print $2}' | egrep -v -i "/bin/|/cvs/|/data/|/docs/|/oe/|/src/|/test/"`; do + if [ "${#dir}" -lt "${#path}" ] || [ -z "$path" ]; then + path=$dir + fi + done + echo "$cvs_path/$path" +} + +function backoff_loop +{ + cvscommand=$1 + + backoff=$(( 4 + (RANDOM % 5) )) + attempt=1; + + while [ 1 ]; do + $cvscommand | tee -a "$tmp_path/cvs_update.log" + if [ "${PIPESTATUS[0]}" -gt 0 ]; then + if [ "$fix_cvs_conflicts" ]; then + for cfile in `egrep "^[C] " "$tmp_path/cvs_update.log" | cut -d' ' -f2`; do + echo "- fixing cvs conflict: $cfile" + if [ -e "$cfile" ]; then + rm "$cfile" + fi + done + fi + + attempt=$(($attempt + 1)) + for (( i = $backoff / 2; i > 0; i-- )) do + set_title "Checkout FAILED! Next attempt $attempt in $i seconds" + echo -n -e "\rFAILED! Next attempt $attempt in \033[1m$i\033[0m seconds" + sleep 1 + done + echo -n -e "\r \r" + if [[ backoff -le max_backoff ]] ; then + backoff=$(( ($backoff * 2) + (RANDOM % 5) )) + fi + else + break + fi + done +} + +function get_cvs () +{ + repo=$1 + + cd $cvs_path + if [ -d "$repo" ]; then + if [ -n "$only" ]; then + set_title "Updating source of '$repo' ($pkg_pos/$pkg_total)" + echo "- updating source of '`basename "$repo"`' (please wait, this won't output much) ..." + else + set_title "Updating source of repo '$repo'" + echo "- updating source of repo '$repo' (please wait, this won't output much) ..." + fi + cd "$repo" + backoff_loop "cvs -z3 -q update -dP" + else + if [ -n "$only" ]; then + set_title "Checkout source of '$repo' ($pkg_pos/$pkg_total)" + echo "- checkout source of '`basename "$repo"`' ..." + else + set_title "Checkout source of repo '$repo'" + echo "- checkout source of repo '$repo' ..." + fi + backoff_loop "cvs -z3 -q -d $cvs_srv co $repo" + fi + echo +} + +function build_each () +{ + repo="$1" + array=$2 + + for name in $array + do + path=`find_path $repo $name` + compile "$name" "$path" + done +} + +function run_command () +{ + name=$1 + path=$2 + title=$3 + log_title=$4 + mode_needed=$5 + cmd=$6 + + set_title "$name: $title ($pkg_pos/$pkg_total)" + echo -n "$log_title" + logfile_banner "$cmd" "$logs_path/$name.log" + + if [ $mode_needed == "rootonly" ]; then + mode_needed=$mode + else + if [ $nice_level -ge 0 ]; then + mode_needed="user" + fi + fi + rm -f $tmp_path/$name.noerrors + case "$mode_needed" in + "sudo") + echo "$sudopwd" | sudo -S nice -n $nice_level $cmd >> "$logs_path/$name.log" 2>&1 && touch $tmp_path/$name.noerrors & + ;; + *) + nice -n $nice_level $cmd >> "$logs_path/$name.log" 2>&1 && touch $tmp_path/$name.noerrors & + ;; + esac + + pid="$!" + rotate "$pid" "$name" +} + +function compile () +{ + name=$1 + path=$2 + cnt=${#name} + max=27 + make_extra="" + + touch "$logs_path/$name.log" + rm $tmp_path/$name.noerrors 2>/dev/null + echo -n "- $name " + while [ ! $cnt = $max ] + do + echo -n "." + cnt=`expr $cnt + 1` + done + echo -n " " + + for one in $skip + do + if [ "$name" == "$one" ]; then + echo "SKIPPED" + touch $tmp_path/$name.skipped + return + fi + done + if [ "$only" ] || [ "$action" == "update" ]; then + found="" + for one in $only + do + if [ "$name" == "$one" ]; then + found=1 + fi + done + if [ -z "$found" ]; then + echo "SKIPPED" + touch $tmp_path/$name.skipped + return + fi + fi + + if [ ! -d "$path" ]; then + echo "NOT FOUND" + return + fi + cd "$path" + + touch "$logs_path/$name.log" + pkg_pos=`expr $pkg_pos + 1` + + if [[ clean -ge 1 ]] ; then + rm -f "$logs_path/$name.log" + touch "$logs_path/$name.log" + if [ ! -e "Makefile" ]; then + echo "can't clean" + return + fi + if [[ clean -eq 1 ]] ; then + cmd="$make clean" + logfile_banner "$cmd" "$logs_path/$name.log" + $cmd >> "$logs_path/$name.log" 2>&1 && touch $tmp_path/$name.noerrors & + fi + if [[ clean -eq 2 ]] ; then + echo -n "distclean: " + cmd="$make clean distclean" + logfile_banner "$cmd" "$logs_path/$name.log" + $cmd >> "$logs_path/$name.log" 2>&1 && touch $tmp_path/$name.noerrors & + fi + if [[ clean -ge 3 ]] ; then + echo -n "uninstall: " + cmd="$make uninstall clean distclean" + logfile_banner "$cmd" "$logs_path/$name.log" + case "$mode" in + "sudo") + echo "$sudopwd" | sudo -S nice -n $nice_level $cmd >> "$logs_path/$name.log" 2>&1 && touch $tmp_path/$name.noerrors & + ;; + *) + nice -n $nice_level $cmd >> "$logs_path/$name.log" 2>&1 && touch $tmp_path/$name.noerrors & + ;; + esac + # It's no longer installed if we just uninstalled it. + # Even if the uninstall failed, it's best to mark it as uninstalled so that a partial uninstall gets fixed later. + rm -f $tmp_path/$name.installed + fi + pid="$!" + rotate "$pid" "$name" + rm -f $tmp_path/$name.noerrors + echo "ok" + return + fi + + if [ -e "$tmp_path/$name.installed" ]; then + echo "previously installed" + return + fi + + # get autogen arguments + args="" + for app_arg in `echo $autogen_args | tr -s '\,' ' '` + do + app=`echo $app_arg | cut -d':' -f1` + if [ "$app" == "$name" ]; then + args="$args `echo $app_arg | cut -d':' -f2- | tr -s '+' ' '`" + fi + done + + if [ -e "autogen.sh" ]; then + run_command "$name" "$path" "autogen" "autogen: " "$mode" "./autogen.sh --prefix=$install_path $accache $args" + if [ ! -e "$tmp_path/$name.noerrors" ] ; then return ; fi + else + if [ -e "bootstrap" ]; then + run_command "$name" "$path" "bootstrap" "bootstrap: " "$mode" "./bootstrap" + if [ ! -e "$tmp_path/$name.noerrors" ] ; then return ; fi + run_command "$name" "$path" "configure" "configure: " "$mode" "./configure --prefix=$install_path $accache $args" + if [ ! -e "$tmp_path/$name.noerrors" ] ; then return ; fi + else + if [ -e "Makefile.PL" ]; then + run_command "$name" "$path" "perl" "perl make: " "$mode" "perl Makefile.PL prefix=$install_path $args" + if [ ! -e "$tmp_path/$name.noerrors" ] ; then return ; fi + else + if [ -e "Makefile" ]; then + make_extra="PREFIX=$install_path" + else + echo "no build system" + touch $tmp_path/$name.nobuild + return + fi + fi + fi + fi + + run_command "$name" "$path" "make" "make : " "$mode" "$make $make_extra -j $threads" + if [ ! -e "$tmp_path/$name.noerrors" ] ; then return ; fi + + if [ "$gen_docs" ]; then + if [ -e "gendoc" ]; then + run_command "$name" "$path" "docs" "docs : " "$mode" "sh gendoc" + if [ ! -e "$tmp_path/$name.noerrors" ] ; then return ; fi + fi + fi + + run_command "$name" "$path" "install" "install: " "rootonly" "$make $make_extra install" + if [ ! -e "$tmp_path/$name.noerrors" ] ; then return ; fi + + # All done, mark it as installed OK. + touch $tmp_path/$name.installed + rm -f $tmp_path/$name.noerrors + echo "ok" +} + +function rotate () +{ + pid=$1 + name=$2 + star=1 + log_line="" + + while [ "`ps -p $pid -o comm=`" ] + do + last_line=`tail -1 "$logs_path/$name.log"` + if [ ! "$log_line" = "$last_line" ]; then + echo -e -n "\b\b\b" + case $star in + 1) + echo -n "[" + echo -n -e "\033[1m|\033[0m" + echo -n "]" + star=2 + ;; + 2) + echo -n "[" + echo -n -e "\033[1m/\033[0m" + echo -n "]" + star=3 + ;; + 3) + echo -n "[" + echo -n -e "\033[1m-\033[0m" + echo -n "]" + star=4 + ;; + 4) + echo -n "[" + echo -n -e "\033[1m" + echo -n "\\" + echo -n -e "\033[0m" + echo -n "]" + star=1 + ;; + esac + log_line=$last_line + fi + sleep 1 + done + + del_lines 12 + if [ ! -e "$tmp_path/$name.noerrors" ]; then + echo -e "\033[1mERROR!\033[0m" + + if [ ! "$skip_errors" ]; then + set_title "$name: ERROR" + echo -e "\033[1m--------------------------------------------------------------------------------\033[0m" + echo + echo -e "\033[1m-----------------------------------\033[7m Last loglines \033[0m\033[1m------------------------------\033[0m" + echo -n -e "\033[1m" + tail -25 "$logs_path/$name.log" + echo -n -e "\033[0m" + echo -e "\033[1m--------------------------------------------------------------------------------\033[0m" + echo + echo "-> Get more informations by checking the log file '$logs_path/$name.log'!" + echo + exit + fi + fi +} + +function del_lines () +{ + cnt=0 + max=$1 + while [ ! "$cnt" == "$max" ] + do + echo -n -e "\b \b" + cnt=`expr $cnt + 1` + done +} + +function error () +{ + set_title "ERROR: $1" + echo -e "\n\n\033[1mERROR: $1\033[0m\n\n" + exit 2 +} + +function set_title () +{ + if [ "$1" ]; then + message="- $1" + fi + + if [ "$DISPLAY" ]; then + case "$TERM" in + xterm*|rxvt*|Eterm|eterm|Aterm|aterm) + echo -ne "\033]0;Easy_e17.sh $message\007" + ;; + esac + fi +} + +function logfile_banner () +{ + cmd=$1 + logfile=$2 + echo "-------------------------------------------------------------------------------" >> "$logfile" + echo "EASY_E17 CMD: $cmd" >> "$logfile" + echo "-------------------------------------------------------------------------------" >> "$logfile" +} + +function get_repo () +{ + if [ -n "$only" ]; then + # single install + for pkg in $only + do + for each in $efl + do + if [ "$each" == "$pkg" ]; then + path=`find_path "e17/" "$pkg"` + get_cvs "$path" + fi + done + + for each in $apps + do + if [ "$each" == "$pkg" ]; then + path=`find_path "e17/" "$pkg"` + get_cvs "$path" + fi + done + + for each in $apps_misc + do + if [ "$each" == "$pkg" ]; then + path=`find_path "misc/" "$pkg"` + get_cvs "$path" + fi + done + + for each in $e17_modules + do + if [ "$each" == "$pkg" ]; then + path=`find_path "e_modules/" "$pkg"` + get_cvs "$path" + fi + done + done + else + # full install + get_cvs e17 + get_cvs misc + get_cvs e_modules + if [ "$fullcvs" ]; then + get_cvs devs + get_cvs web + fi + fi +} + +function cnt_pkgs () { + pkg_total=0 + pkg_pos=0 + + if [ -n "$only" ]; then + for each in $only + do + pkg_total=`expr $pkg_total + 1` + done + else + # Maybe some regexp which counts the spaces is faster? + total_pkgs="$efl $apps $apps_misc $e17_modules" + for each in $total_pkgs + do + pkg_total=`expr $pkg_total + 1` + done + fi +} + +function check_script_version () +{ + echo "- local version .............. $version" + echo -n "- downloading script ......... " + remote_version=`wget $online_source -q -U "easy_e17.sh/$version" -O - | grep -m 2 -o [0-9]\.[0-9]\.[0-9] | sort -n | head -n 1` + echo "ok" + echo "- remote version ............. $remote_version" + remote_ver=`echo "$remote_version" | tr -d '.'` + local_ver=`echo "$version" | tr -d '.'` + echo + echo -n "- update available ........... " + if [ $remote_ver -gt $local_ver ]; then + echo -e "\033[1mYES!\033[0m" + else + echo "no" + fi +} + + +# SCRIPT: + +EASY_PWD=`pwd` +set_title +define_os_vars +accache="" +easy_options="" +command_options=$@ +clean=0 + +# Check for alternate conf file first. +test_options=$command_options +for arg in $test_options +do + option=`echo "'$arg'" | cut -d'=' -f1 | tr -d "'"` + value=`echo "'$arg'" | cut -d'=' -f2- | tr -d "'"` + if [ "$value" == "$option" ]; then + value="" + fi + if [ "$option" == "--conf" ]; then + conf_file=$value; + fi +done + +if [ -e "$conf_file" ]; then + # load configfile + for option in `cat "$conf_file"` + do + easy_options="$easy_options $option" + done +fi + +# append arguments +easy_options="$easy_options $command_options" + +# check options +for arg in $easy_options +do + option=`echo "'$arg'" | cut -d'=' -f1 | tr -d "'"` + value=`echo "'$arg'" | cut -d'=' -f2- | tr -d "'"` + if [ "$value" == "$option" ]; then + value="" + fi + + # $action can't be set twice + if [ "$action" ]; then + if [ "$option" == "-i" ] || + [ "$option" == "--install" ] || + [ "$option" == "-u" ] || + [ "$option" == "--update" ] || + [ "$option" == "--only" ] || + [ "$option" == "--cvsupdate" ] || + [ "$option" == "-v" ] || + [ "$option" == "--check-script-version" ]; then + logo 0 "Only one action allowed! (currently using '--$action' and '$option')" + exit + fi + fi + + case "$option" in + "-i") action="install" ;; + "--install") action="install" ;; + "-u") action="update" ;; + "--update") action="update" ;; + "-c") clean=$(( $clean + 1 )) ;; + "--clean") clean=$(( $clean + 1 )) ;; + "--conf") ;; + "--only") + if [ -z "$value" ]; then + logo 0 "Missing value for argument '$option'!" + exit + fi + action="only" + only="`echo "$value" | tr -s '\,' '\ '` $only" + ;; + "-v") action="script" ;; + "--check-script-version") action="script" ;; + "--cvsupdate") + action="cvsupdate" + skip="$efl $apps $apps_misc $e17_modules" + ;; + "--instpath") install_path="$value" ;; + "--cvspath") cvs_path="$value" ;; + "--cvssrv") + cvs_srv="$value" + export CVS_RSH="ssh" + ;; + "--asuser") asuser=1 ;; + "-d") gen_docs=1 ;; + "--docs") gen_docs=1 ;; + "--postscript") easy_e17_post_script="$value" ;; + "--fullcvs") fullcvs=1 ;; + "-s") skip_cvsupdate=1 ;; + "--skip-cvsupdate") skip_cvsupdate=1 ;; + "-f") fix_cvs_conflicts=1 ;; + "--fix-cvs-conflicts") fix_cvs_conflicts=1 ;; + "--skip") + if [ -z "$value" ]; then + logo 0 "Missing value for argument '$option'!" + exit + fi + skip="`echo "$value" | tr -s '\,' '\ '` $skip" + ;; + "-e") skip_errors=1 ;; + "--skip-errors") skip_errors=1 ;; + "-w") wait=1 ;; + "--wait") wait=1 ;; + "-k") keep=1 ;; + "--keep") keep=1 ;; + + "-l") nice_level=19 ;; + "--low") nice_level=19 ;; + "--normal") ;; + "-h") nice_level=-20 ;; + "--high") nice_level=-20 ;; + "--cache") + accache=" --cache-file=$tmp_path/easy_e17.cache" + ccache=`whereis ccache` + if [ ! "$ccache" = "ccache:" ]; then + export CC="ccache gcc" + fi + ;; + "--threads") + if [ -z "$value" ] || ! expr "$value" : "[0-9]*$" >/dev/null || [ "$value" -lt 1 ]; then + logo 0 "Missing value for argument '$option'!" + exit + fi + threads=$value + ;; + + "--efl") + if [ -z "$value" ]; then + logo 0 "Missing value for argument '$option'!" + exit + fi + efl="`echo "$value" | tr -s '\,' '\ '`" + ;; + "--apps") + if [ -z "$value" ]; then + logo 0 "Missing value for argument '$option'!" + exit + fi + apps="`echo "$value" | tr -s '\,' '\ '`" + ;; + "--apps_misc") + if [ -z "$value" ]; then + logo 0 "Missing value for argument '$option'!" + exit + fi + apps_misc="`echo "$value" | tr -s '\,' '\ '`" + ;; + "--e17_modules") + if [ -z "$value" ]; then + logo 0 "Missing value for argument '$option'!" + exit + fi + e17_modules="`echo "$value" | tr -s '\,' '\ '`" + ;; + "--autogen_args") + if [ -z "$value" ]; then + logo 0 "Missing value for argument '$option'!" + exit + fi + autogen_args="$value" + ;; + "--cflags") + if [ -z "$value" ]; then + logo 0 "Missing value for argument '$option'!" + exit + fi + CFLAGS="$CFLAGS `echo "$value" | tr -s '\,' '\ '`" + ;; + "--help") + fullhelp=1 + logo 0 + exit + ;; + *) + logo 0 "Unknown argument '$option'!" + exit + ;; + esac +done + + +# Sanity check stuff if doing everything as user. +if [ "$asuser" ]; then + if [ $nice_level -lt 0 ]; then + nice_level=0 + fi +fi + +# special case to allow uninstall +if [ -z "$action" ] && [ "$clean" -ge 1 ]; then + action="clean" +fi + +# quit if some basic option is missing +if [ -z "$action" ] || [ -z "$install_path" ] || [ -z "$cvs_path" ]; then + logo 0 + exit +fi + +# check for script updates +if [ "$action" == "script" ]; then + logo 0 + echo -e "\033[1m------------------------------\033[7m Check script version \033[0m\033[1m----------------------------\033[0m" + check_script_version + echo -e "\033[1m--------------------------------------------------------------------------------\033[0m" + echo + exit 0 +fi + + +# run script normally +logo 1 +set_title "Basic system checks" +echo -e "\033[1m-------------------------------\033[7m Basic system checks \033[0m\033[1m----------------------------\033[0m" +echo -n "- cvs-dir .................... " +mkdir -p "$cvs_path" 2>/dev/null +if [ ! -w "$cvs_path" ]; then + error "The cvs-dir '$cvs_path' isn't writeable!" +else + echo "ok" +fi +touch "$HOME/.cvspass" 2>/dev/null + +echo -n "- creating script dirs ....... " +mkdir -p "$tmp_path" 2>/dev/null +chmod 700 "$tmp_path" +mkdir -p "$logs_path" 2>/dev/null +echo "ok" + +if [ ! "$action" == "cvsupdate" ]; then + echo -n "- build-user ................. " + if [ ! "$LOGNAME" == "root" ]; then + if [ "$asuser" ]; then + echo "$LOGNAME (as user)" + mode="user" + else + echo "$LOGNAME (non-root)" + echo -n "- sudo available ............. " + sudotest=`type sudo &>/dev/null ; echo $?` + if [ "$sudotest" == 0 ]; then + sudo -K + if [ -e "$tmp_path/sudo.test" ]; then + rm -f "$tmp_path/sudo.test" + fi + while [ -z "$sudopwd" ] + do + echo -n "enter sudo-password: " + stty -echo + read sudopwd + stty echo + + # password check + echo "$sudopwd" | sudo -S touch "$tmp_path/sudo.test" &>/dev/null + if [ ! -e "$tmp_path/sudo.test" ]; then + sudopwd="" + fi + done + echo + mode="sudo" + rm -f "$tmp_path/sudo.test" + else + error "You're not root and sudo isn't available. Please run this script as root!" + fi + fi + else + echo "root" + mode="root" + fi + + echo -n "- adding path to env ......... " + export PATH="$install_path/bin:$PATH" + export PKG_CONFIG_PATH="$install_path/lib/pkgconfig:$PKG_CONFIG_PATH" + export LD_LIBRARY_PATH="$install_path/lib:$LD_LIBRARY_PATH" + echo "ok" + + echo -n "- checking lib-path in ldc ... " + case $os in + FreeBSD) ;; # placeholder + SunOS) ;; # need more testing of adding libraries on different solaris versions. atm this is not working + Linux) + libpath="`grep -r -l -i -m 1 $install_path/lib /etc/ld.so.conf*`" + if [ -z "$libpath" ]; then + case $linux_distri in + gentoo) + e17ldcfg="/etc/env.d/40e17paths" + echo -e "PATH=$install_path/bin\nROOTPATH=$install_path/sbin:$install_path/bin\nLDPATH=$install_path/lib\nPKG_CONFIG_PATH=$install_path/lib/pkgconfig" > $e17ldcfg + env-update &> /dev/null + echo "ok (path has been added to $e17ldcfg)"; + ;; + + *) + if [ "`grep -l 'include /etc/ld.so.conf.d/' /etc/ld.so.conf`" ]; then + e17ldcfg="/etc/ld.so.conf.d/e17.conf" + rm $e17ldcfg 2>/dev/null + else + e17ldcfg="/etc/ld.so.conf"; + cp $e17ldcfg $tmp_path; + fi + + case "$mode" in + "user") ;; + "root") echo "$install_path/lib" >>$e17ldcfg ;; + "sudo") + echo "$install_path/lib" >> $tmp_path/`basename $e17ldcfg` + echo "$sudopwd" | sudo -S mv -f $tmp_path/`basename $e17ldcfg` $e17ldcfg + ;; + esac + if [ "$asuser" ]; then + echo "skipped (running as user)"; + else + echo "ok (path has been added to $e17ldcfg)"; + fi + ;; + esac + else + echo "ok ($libpath)"; + fi + ;; + esac + + echo -n "- setting compile options .... " + export CPPFLAGS="$CPPFLAGS -I$install_path/include" + export LDFLAGS="$LDFLAGS -L$install_path/lib" + echo "ok" +fi + +echo -e "\033[1m--------------------------------------------------------------------------------\033[0m" +echo + + +# do the clean first if not just cleaning. +if [[ clean -ge 1 ]] ; then + if [ "$action" != "clean" ]; then + set_title "Pre cleaning" + sleep 5 + + echo -e "\033[1m----------------------------\033[7m Precleaning libraries (EFL) \033[0m\033[1m-----------------------\033[0m" + pkg_pos=0 + build_each "e17/" "$efl" + echo -e "\033[1m--------------------------------------------------------------------------------\033[0m" + echo + + echo -e "\033[1m-----------------------------\033[7m Precleaning applications \033[0m\033[1m-------------------------\033[0m" + build_each "e17/" "$apps" + build_each "misc/" "$apps_misc" + echo -e "\033[1m--------------------------------------------------------------------------------\033[0m" + echo + + echo -e "\033[1m-----------------------------\033[7m Precleaning e17 modules \033[0m\033[1m--------------------------\033[0m" + build_each "e_modules/" "$e17_modules" + echo -e "\033[1m--------------------------------------------------------------------------------\033[0m" + echo + + clean=0 + fi +fi + + +# cvs +echo -e "\033[1m-------------------------------\033[7m CVS checkout/update \033[0m\033[1m----------------------------\033[0m" +if [ -z "$skip_cvsupdate" ]; then + rm "$tmp_path/cvs_update.log" 2>/dev/null + get_repo +else + echo -e "\n - - - SKIPPED - - -\n" +fi +echo -e "\033[1m--------------------------------------------------------------------------------\033[0m" +echo + +if [ "$action" == "update" ] && [ -e "$tmp_path/cvs_update.log" ]; then + for update in `egrep "^[P|U] " "$tmp_path/cvs_update.log" | egrep "apps/|libs/|proto/" | cut -d'/' -f2 | sort -u`; do + for package in $efl $apps; do + if [ "$update" == "$package" ]; then + only="$update $only" + fi + done + done + for update in `egrep "^[P|U] " "$tmp_path/cvs_update.log" | egrep -v "apps/|libs/|proto/" | cut -d'/' -f1 | cut -d' ' -f2 | sort -u`; do + for package in $apps_misc $e17_modules; do + if [ "$update" == "$package" ]; then + only="$update $only" + fi + done + done +fi + +cnt_pkgs # Count packages + + +echo -n "-> PREPARING FOR PHASE 2..." +set_title "Preparing for phase 2... compilation & installation" +sleep 5 + +logo 2 +echo -e "\033[1m---------------------------\033[7m Installing libraries (EFL) \033[0m\033[1m-------------------------\033[0m" +pkg_pos=0 +build_each "e17/" "$efl" +echo -e "\033[1m--------------------------------------------------------------------------------\033[0m" +echo + +echo -e "\033[1m----------------------------\033[7m Installing applications \033[0m\033[1m---------------------------\033[0m" +build_each "e17/" "$apps" +build_each "misc/" "$apps_misc" +echo -e "\033[1m--------------------------------------------------------------------------------\033[0m" +echo + +echo -e "\033[1m-----------------------------\033[7m Installing e17 modules \033[0m\033[1m---------------------------\033[0m" +build_each "e_modules/" "$e17_modules" +echo -e "\033[1m--------------------------------------------------------------------------------\033[0m" +echo + +# Restore current directory in case post processing wants to be pathless. +cd $EASY_PWD + +echo -e "\033[1m-----------------------------\033[7m Finishing installation \033[0m\033[1m---------------------------\033[0m" +echo -n "- registering libraries ...... " +if [ -z "$asuser" ]; then + case "$mode" in + "sudo") echo "$sudopwd" | sudo -S nice -n $nice_level $ldconfig > /dev/null 2>&1 ;; + *) nice -n $nice_level $ldconfig > /dev/null 2>&1 ;; + esac + echo "ok" +else + echo "skipped" +fi +echo -n "- post install script ........ " +if [ "$easy_e17_post_script" ]; then + echo -n " '$easy_e17_post_script' ... " + case "$mode" in + "sudo") echo "$sudopwd" | sudo -S nice -n $nice_level $easy_e17_post_script ;; + *) nice -n $nice_level $easy_e17_post_script ;; + esac + echo "ok" +else + echo "skipped" +fi +echo -e "\033[1m--------------------------------------------------------------------------------\033[0m" +echo + + +echo -n "-> PREPARING FOR PHASE 3..." +set_title "Preparing for phase 3..." +sleep 5 + +logo 3 +set_title "Finished" + +for file in $logs_path/*.log ; do + package=`basename "$file" | cut -d'.' -f1` + if [ -e "$tmp_path/$package.installed" ]; then + packages_installed="$packages_installed $package" + else + if [ -e "$tmp_path/$package.skipped" ]; then + packages_skipped="$packages_skipped $package" + else + if [ -e "$tmp_path/$package.nobuild" ]; then + packages_nobuild="$packages_nobuild $package" + else + packages_failed="$packages_failed $package" + fi + fi + fi +done + +echo -e "\033[1m--------------------------------\033[7m Cleaning temp dir \033[0m\033[1m-----------------------------\033[0m" +if [ -z "$keep" ]; then + if [ "$packages_failed" ]; then + echo -n "- saving logs ................ " + for package in $packages_installed; do + rm "$tmp_path/$package.installed" 2>/dev/null + rm "$logs_path/$package.log" 2>/dev/null + done + else + echo -n "- deleting temp dir .......... " + rm -rf $tmp_path 2>/dev/null + fi + echo "ok" +else + echo "- saving temp dir ............ ok" +fi +echo -e "\033[1m--------------------------------------------------------------------------------\033[0m" +echo + +if [ "$packages_failed" ]; then + echo -e "\033[1m---------------------------------\033[7m Failed packages \033[0m\033[1m------------------------------\033[0m" + for package in $packages_failed; do + echo "- $package (error log: $logs_path/$package.log)" + done + echo -e "\033[1m--------------------------------------------------------------------------------\033[0m" + echo +fi + +if [ "$action" == "install" ]; then + echo "INSTALL NOTES:" + echo "-----------------------------------------------------------------------------" + echo "The most incredible and really unbelivable dream has become true:" + echo "You compiled e17 sucessfully!" + echo + echo "Starting e17:" + echo "Create a file ~/.xsession with the line 'exec $install_path/bin/enlightenment_start'." + echo "Add a link to this file using 'ln -s ~/.xsession ~/.xinitrc'." + echo + echo "If you're using a login manager (GDM/KDM), select the session type 'default' in them." + echo "If you're using the startx command, simply execute it now." + echo + echo "Note: e17 is still not released and it won't be in the near future. So don't" + echo "ask for a stable release. e17 is still very buggy and only for experienced users" + echo "who know what they do..." + echo + echo "Rasterman didn't write this script so don't ask him for help with it." + echo + echo "Hint: From now on you can easily keep your installation up to date." + echo "Simply run easy_e17.sh with -u instead of -i ." + echo + echo "We hope you will enjoy your trip into e17... Have fun!" + echo -e "\033[1m--------------------------------------------------------------------------------\033[0m" + echo +fi + +# Clear this out if we ever set it. +export CC="" + +# exit script or wait? +if [ "$wait" ]; then + echo + echo -e -n "\033[1mThe script is waiting here - simply press [enter] to exit.\033[0m" + read +fi + +if [ "$packages_failed" ]; then + exit 2 +else + exit 0 +fi diff --git a/pyphone/icon_accept.png b/pyphone/icon_accept.png new file mode 100644 index 0000000..d97ca4a Binary files /dev/null and b/pyphone/icon_accept.png differ diff --git a/pyphone/icon_back.png b/pyphone/icon_back.png new file mode 100644 index 0000000..a53bb0c Binary files /dev/null and b/pyphone/icon_back.png differ diff --git a/pyphone/icon_close.png b/pyphone/icon_close.png new file mode 100644 index 0000000..3d6f7ac Binary files /dev/null and b/pyphone/icon_close.png differ diff --git a/pyphone/icon_delete.png b/pyphone/icon_delete.png new file mode 100644 index 0000000..64c4236 Binary files /dev/null and b/pyphone/icon_delete.png differ diff --git a/pyphone/icon_dial.png b/pyphone/icon_dial.png new file mode 100644 index 0000000..d3a7c9e Binary files /dev/null and b/pyphone/icon_dial.png differ diff --git a/pyphone/icon_down.png b/pyphone/icon_down.png new file mode 100644 index 0000000..e96f931 Binary files /dev/null and b/pyphone/icon_down.png differ diff --git a/pyphone/icon_enter.png b/pyphone/icon_enter.png new file mode 100644 index 0000000..9df80ad Binary files /dev/null and b/pyphone/icon_enter.png differ diff --git a/pyphone/icon_left.png b/pyphone/icon_left.png new file mode 100644 index 0000000..0802c0d Binary files /dev/null and b/pyphone/icon_left.png differ diff --git a/pyphone/icon_main.png b/pyphone/icon_main.png new file mode 100644 index 0000000..aeb230f Binary files /dev/null and b/pyphone/icon_main.png differ diff --git a/pyphone/icon_options.png b/pyphone/icon_options.png new file mode 100644 index 0000000..d2deae7 Binary files /dev/null and b/pyphone/icon_options.png differ diff --git a/pyphone/icon_right.png b/pyphone/icon_right.png new file mode 100644 index 0000000..f7ccdc3 Binary files /dev/null and b/pyphone/icon_right.png differ diff --git a/pyphone/icon_space.png b/pyphone/icon_space.png new file mode 100644 index 0000000..2650135 Binary files /dev/null and b/pyphone/icon_space.png differ diff --git a/pyphone/icon_up.png b/pyphone/icon_up.png new file mode 100644 index 0000000..a816a79 Binary files /dev/null and b/pyphone/icon_up.png differ diff --git a/pyphone/pyphone.edc b/pyphone/pyphone.edc new file mode 100644 index 0000000..7828cd2 --- /dev/null +++ b/pyphone/pyphone.edc @@ -0,0 +1,526 @@ +fonts { + font: "DejaVuSansMono.ttf" "Sans"; +} + +images { + image: "background.png" COMP; + image: "button_contacts.png" COMP; + image: "button_phone.png" COMP; + image: "button_power.png" COMP; + image: "button_sms.png" COMP; + image: "button_main_background.png" COMP; + image: "button_main_background_active.png" COMP; + image: "button_background.png" COMP; + image: "button_background_active.png" COMP; + image: "icon_options.png" COMP; + image: "icon_main.png" COMP; + image: "icon_close.png" COMP; + image: "icon_left.png" COMP; + image: "icon_right.png" COMP; + image: "icon_dial.png" COMP; + image: "icon_accept.png" COMP; + image: "icon_delete.png" COMP; + image: "icon_up.png" COMP; + image: "icon_down.png" COMP; + image: "icon_space.png" COMP; + image: "icon_enter.png" COMP; +} + +#define BUTTON_BOTTOM_HEIGHT 0.12; +#define HEADER_HEIGHT 0.06; + +#define TRANSITION() \ + program { \ + name: "fadeout"; \ + signal: "fadeout"; \ + action: STATE_SET "invisible" 0.0; \ + transition: LINEAR 0.3; \ + target: "swallow_clip"; \ + after: "finish_fade"; \ + } \ + program { \ + name: "set_visible"; \ + signal: "visible"; \ + action: STATE_SET "default" 0.0; \ + target: "swallow_clip"; \ + } \ + program { \ + name: "finish_fade"; \ + action: SIGNAL_EMIT "finished_transition" "main"; \ + } + +#define ACTIVATE(part_name) \ + program { \ + name: "activate_"part_name; \ + signal: "mouse,in"; \ + source: part_name; \ + action: STATE_SET "active" 0.0; \ + target: part_name; \ + } \ + program { \ + name: "click_activate_"part_name; \ + signal: "mouse,down,1"; \ + source: part_name; \ + action: STATE_SET "active" 0.0; \ + target: part_name; \ + } \ + program { \ + name: "deactivate_"part_name; \ + signal: "mouse,out"; \ + source: part_name; \ + action: STATE_SET "default" 0.0; \ + target: part_name; \ + } + +#define EMIT_TRANSITION(part_name, target) \ + program { \ + name: "emit_clicked_"part_name; \ + signal: "mouse,clicked,1"; \ + source: part_name; \ + action: SIGNAL_EMIT "transition:"target part_name; \ + } + +#define SWALLOWCLIP() \ + part { \ + name: "swallow_clip"; \ + mouse_events: 0; \ + type: RECT; \ + description { \ + state: "default" 0.0; \ + rel1 { \ + relative: 0.0 0.0; \ + offset: 0 0; \ + } \ + rel2 { \ + relative: 1.0 1.0; \ + offset: -1 -1; \ + } \ + color: 255 255 255 255; \ + } \ + description { \ + state: "invisible" 0.0; \ + inherit: "default" 0.0; \ + color: 255 255 255 0; \ + } \ + } \ + part { \ + name: "background"; \ + type: IMAGE; \ + mouse_events: 0; \ + clip_to: "swallow_clip"; \ + description { \ + state: "default" 0.0; \ + rel1 { \ + relative: 0.0 0.0; \ + offset: 0 0; \ + } \ + rel2 { \ + relative: 1.0 1.0-BUTTON_BOTTOM_HEIGHT; \ + offset: -1 -1; \ + } \ + image { normal: "background.png"; } \ + } \ + } + +#define BUTTONS_BOTTOM() \ + part { \ + name: "button_bottom_background"; \ + mouse_events: 0; \ + type: RECT; \ + clip_to: "swallow_clip"; \ + description { \ + state: "default" 0.0; \ + rel1 { \ + relative: 0.0 1.0-BUTTON_BOTTOM_HEIGHT; \ + offset: 0 0; \ + } \ + rel2 { \ + relative: 1.0 1.0; \ + offset: -1 -1; \ + } \ + color: 255 255 255 0; \ + } \ + } \ + part { \ + name: "button_bottom_left"; \ + mouse_events: 1; \ + type: IMAGE; \ + clip_to: "swallow_clip"; \ + description { \ + state: "default" 0.0; \ + rel1 { \ + relative: 0.0 0.0; \ + offset: 1 1; \ + to: "button_bottom_background"; \ + } \ + rel2 { \ + relative: 1/3 1.0; \ + offset: -1 -2; \ + to: "button_bottom_background"; \ + } \ + image { normal: "button_background.png"; } \ + } \ + description { \ + state: "active" 0.0; \ + inherit: "default" 0.0; \ + image { normal: "button_background_active.png"; } \ + } \ + } \ + part { \ + name: "button_bottom_middle"; \ + mouse_events: 1; \ + type: IMAGE; \ + clip_to: "swallow_clip"; \ + description { \ + state: "default" 0.0; \ + rel1 { \ + relative: 1/3 0.0; \ + offset: 1 1; \ + to: "button_bottom_background"; \ + } \ + rel2 { \ + relative: 2/3 1.0; \ + offset: -2 -2; \ + to: "button_bottom_background"; \ + } \ + image { normal: "button_background.png"; } \ + } \ + description { \ + state: "active" 0.0; \ + inherit: "default" 0.0; \ + image { normal: "button_background_active.png"; } \ + } \ + } \ + part { \ + name: "button_bottom_right"; \ + mouse_events: 1; \ + type: IMAGE; \ + clip_to: "swallow_clip"; \ + description { \ + state: "default" 0.0; \ + rel1 { \ + relative: 2/3 0.0; \ + offset: 0 1; \ + to: "button_bottom_background"; \ + } \ + rel2 { \ + relative: 1.0 1.0; \ + offset: -2 -2; \ + to: "button_bottom_background"; \ + } \ + image { normal: "button_background.png"; } \ + } \ + description { \ + state: "active" 0.0; \ + inherit: "default" 0.0; \ + image { normal: "button_background_active.png"; } \ + } \ + } + +#define BUTTON_OPTIONS() \ + part { \ + name: "button_options"; \ + mouse_events: 0; \ + type: IMAGE; \ + clip_to: "swallow_clip"; \ + description { \ + state: "default" 0.0; \ + aspect: 1.0 1.0; \ + aspect_preference: BOTH; \ + rel1 { \ + relative: 0.0 0.0; \ + offset: 0 0; \ + to: "button_bottom_left"; \ + } \ + rel2 { \ + relative: 1.0 1.0; \ + offset: -1 -1; \ + to: "button_bottom_left"; \ + } \ + image { normal: "icon_options.png"; } \ + } \ + } + +#define BUTTON_MENU() \ + part { \ + name: "button_menu"; \ + mouse_events: 0; \ + type: IMAGE; \ + clip_to: "swallow_clip"; \ + description { \ + state: "default" 0.0; \ + aspect: 1.0 1.0; \ + aspect_preference: BOTH; \ + rel1 { \ + relative: 0.0 0.0; \ + offset: 0 0; \ + to: "button_bottom_middle"; \ + } \ + rel2 { \ + relative: 1.0 1.0; \ + offset: -1 -1; \ + to: "button_bottom_middle"; \ + } \ + image { normal: "icon_main.png"; } \ + } \ + } + +#define BUTTON_CLOSE() \ + part { \ + name: "button_close"; \ + mouse_events: 0; \ + type: IMAGE; \ + clip_to: "swallow_clip"; \ + description { \ + state: "default" 0.0; \ + aspect: 1.0 1.0; \ + aspect_preference: BOTH; \ + rel1 { \ + relative: 0.0 0.0; \ + offset: 0 0; \ + to: "button_bottom_right"; \ + } \ + rel2 { \ + relative: 1.0 1.0; \ + offset: -1 -1; \ + to: "button_bottom_right"; \ + } \ + image { normal: "icon_close.png"; } \ + } \ + } + + +collections { + group { + name: "swallow"; + parts { + part { + name: "background_color"; + type: RECT; + description { + state: "default" 0.0; + rel1 { + relative: 0.0 0.0; + offset: 0 0; + } + rel2 { + relative: 1.0 1.0; + offset: -1 -1; + } + color: 255 128 128 255; + } + } + part { + name: "top"; + type: RECT; + description { + state: "default" 0.0; + rel1 { + relative: 0.0 0.0; + offset: 0 0; + } + rel2 { + relative: 1.0 HEADER_HEIGHT; + offset: -1 -1; + } + color: 0 0 0 255; + } + } + part { + name: "button_bottom_background"; + mouse_events: 0; + type: RECT; + description { + state: "default" 0.0; + rel1 { + relative: 0.0 1.0-BUTTON_BOTTOM_HEIGHT; + offset: 0 0; + } + rel2 { + relative: 1.0 1.0; + offset: -1 -1; + } + color: 255 255 255 255; + } + } + part { + name: "swallow1"; + mouse_events: 1; + type: SWALLOW; + description { + state: "default" 0.0; + rel1 { + relative: 0.0 HEADER_HEIGHT; + offset: 0 0; + } + rel2 { + relative: 1.0 1.0; + offset: -1 -1; + } + } + } + part { + name: "swallow2"; + type: SWALLOW; + description { + state: "default" 0.0; + rel1 { + relative: 0.0 HEADER_HEIGHT; + offset: 0 0; + } + rel2 { + relative: 1.0 1.0; + offset: -1 -1; + } + } + } + } + } + group { + name: "main"; + + parts { + SWALLOWCLIP(); + + part { + name: "label_background"; + type: RECT; + mouse_events: 0; + clip_to: "swallow_clip"; + description { + state: "default" 0.0; + rel1 { + relative: 0.0 0.1; + offset: 0 0; + to: "background"; + } + rel2 { + relative: 1.0 0.3; + offset: -1 -1; + to: "background"; + } + color: 255 255 255 64; + } + } + part { + name: "label"; + type: TEXT; + effect: SOFT_OUTLINE; + mouse_events: 0; + clip_to: "swallow_clip"; + description { + state: "default" 0.0; + rel1 { + relative: 0.1 0.0; + offset: 0 0; + to: "label_background"; + } + rel2 { + relative: 0.9 1.0; + offset: -1 -1; + to: "label_background"; + } + align: 0.5 0.5; + text { + font: "Sans"; + size: 1; + fit: 1 1; + } + } + } + + #define ICON(part_name, xpos, ypos) \ + part { \ + name: "button_"part_name; \ + mouse_events: 1; \ + type: IMAGE; \ + clip_to: "swallow_clip"; \ + description { \ + state: "default" 0.0; \ + rel1 { \ + relative: 0.05+(xpos*0.5) 0.35+(ypos*0.3); \ + offset: 0 0; \ + to: "background"; \ + } \ + rel2 { \ + relative: 0.45+(xpos*0.5) 0.6+(ypos*0.3); \ + offset: -1 -1; \ + to: "background"; \ + } \ + image { \ + normal: "button_main_background.png"; \ + border: 27 27 27 27; \ + } \ + } \ + description { \ + state: "active" 0.0; \ + inherit: "default" 0.0; \ + image { \ + normal: "button_main_background_active.png"; \ + border: 27 27 27 27; \ + } \ + } \ + } \ + part { \ + name: "button_icon_"part_name; \ + mouse_events: 0; \ + type: IMAGE; \ + clip_to: "swallow_clip"; \ + description { \ + state: "default" 0.0; \ + aspect: 1.0 1.0; \ + aspect_preference: BOTH; \ + rel1 { \ + relative: 0.0 0.0; \ + offset: 0 0; \ + to: "button_"part_name; \ + } \ + rel2 { \ + relative: 1.0 1.0; \ + offset: -1 -1; \ + to: "button_"part_name; \ + } \ + image { \ + normal: "button_"part_name".png"; \ + } \ + } \ + } + ICON("phone", 0, 0); + ICON("contacts", 0, 1); + ICON("power", 1, 1); + ICON("sms", 1, 0); + + BUTTONS_BOTTOM(); + } + programs { + EMIT_TRANSITION("button_phone", "phone"); + EMIT_TRANSITION("button_contacts", "contacts"); + EMIT_TRANSITION("button_sms", "sms"); + EMIT_TRANSITION("button_power", "power"); + + ACTIVATE("button_phone"); + ACTIVATE("button_contacts"); + ACTIVATE("button_sms"); + ACTIVATE("button_power"); + + TRANSITION(); + } + } + + group { + name: "contacts"; + #include "pyphone_contacts.edc" + } + group { + name: "phone"; + #include "pyphone_phone.edc" + } + group { + name: "sms"; + #include "pyphone_sms.edc" + } + group { + name: "power"; + #include "pyphone_power.edc" + } +} diff --git a/pyphone/pyphone.edj b/pyphone/pyphone.edj new file mode 100644 index 0000000..220c51a Binary files /dev/null and b/pyphone/pyphone.edj differ diff --git a/pyphone/pyphone.py b/pyphone/pyphone.py new file mode 100755 index 0000000..1d39ba9 --- /dev/null +++ b/pyphone/pyphone.py @@ -0,0 +1,415 @@ +#!/usr/bin/python +#coding=utf8 + +WIDTH = 480 +HEIGHT = 640 + +TITLE = "pyphone" +WM_NAME = "pyphone" +WM_CLASS = "swallow" + +import os +import sys +import e_dbus +import evas +import evas.decorators +import edje +import edje.decorators +import ecore +import ecore.evas +from dbus import SystemBus, Interface +from optparse import OptionParser +import time + +class edje_group(edje.Edje): + def __init__(self, main, group): + self.main = main + f = os.path.splitext(sys.argv[0])[0] + ".edj" + try: + edje.Edje.__init__(self, self.main.evas_canvas.evas_obj.evas, file=f, group=group) + except edje.EdjeLoadError, e: + raise SystemExit("error loading %s: %s" % (f, e)) + self.size = self.main.evas_canvas.evas_obj.evas.size + + @edje.decorators.signal_callback("transition:*", "*") + def on_edje_signal_transition(self, emission, source): + if not self.main.in_transition: + self.main.in_transition = True + self.main.transition_to(emission.split(':')[1]) + + @edje.decorators.signal_callback("finished_transition", "*") + def on_edje_signal_finished_transition(self, emission, source): + self.main.transition_finished() + self.main.in_transition = False + +class pyphone_main(edje_group): + def __init__(self, main): + edje_group.__init__(self, main, "main") + +class pyphone_phone(edje_group): + def __init__(self, main): + edje_group.__init__(self, main, "phone") + self.text = [] + + @edje.decorators.signal_callback("dialer_button_pressed", "*") + def on_edje_signal_dialer_button_pressed(self, emission, source): + if "button_" in source: + key = source.split("_", 1)[1] + if key in ("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "#"): + self.text.append(key) + self.part_text_set("label", "".join(self.text)) + elif key in "star": + self.text.append("*") + self.part_text_set("label", "".join(self.text)) + elif key in "delete": + self.text = self.text[:-1] + self.part_text_set("label", "".join(self.text)) + else: + key = source + #self.text.append(source) + #self.part_text_set("label", "".join(self.text)) + +class pyphone_sms(edje_group): + def __init__(self, main): + edje_group.__init__(self, main, "sms") + self.text = [] + self.button_labels2 = [ + [ + [".,?!", "abc", "def", ""], + ["ghi", "jkl", "mno", ""], + ["pqrs", "tuv", "wxyz", ""], + ["", "", "⇦⇧⇨", ""], + ], + [ + ["", "", "", ""], + ["", "", "", ""], + ["", "", "", ""], + ["", "", "", ""], + ] + ] + self.button_labels = [ + [ + ["1", "2", "3", "↤"], + ["4", "5", "6", "↲"], + ["7", "8", "9", "Abc"], + ["+", "0", "⇩", "+"], + ], + [ + ["1", "?", "", ""], + [".", ",", "", ""], + ["!", "", "", ""], + ["", "", "", ""], + ], + [ + ["", "2", "c", ""], + ["", "a", "b", ""], + ["", "", "", ""], + ["", "", "", ""], + ], + [ + ["", "", "3", "f"], + ["", "", "d", "e"], + ["", "", "", ""], + ["", "", "", ""], + ], + [ + ["", "", "", "↤"], + ["", "", "", ""], + ["", "", "", ""], + ["", "", "", ""], + ], + [ + ["", "", "", ""], + ["4", "i", "", ""], + ["g", "h", "", ""], + ["", "", "", ""], + ], + [ + ["", "", "", ""], + ["", "5", "l", ""], + ["", "j", "k", ""], + ["", "", "", ""], + ], + [ + ["", "", "", ""], + ["", "", "6", "o"], + ["", "", "m", "n"], + ["", "", "", ""], + ], + [ + ["", "", "", ""], + ["", "", "", ""], + ["", "", "", ""], + ["", "", "", ""], + ], + [ + ["", "", "", ""], + ["", "s", "", ""], + ["7", "r", "", ""], + ["p", "q", "", ""], + ], + [ + ["", "", "", ""], + ["", "", "", ""], + ["", "8", "v", ""], + ["", "t", "u", ""], + ], + [ + ["", "", "", ""], + ["", "", "", "z"], + ["", "", "9", "y"], + ["", "", "w", "x"], + ], + [ + ["", "", "", ""], + ["", "", "", ""], + ["", "", "", ""], + ["", "", "", ""], + ], + [ + ["", "", "", ""], + ["", "", "", ""], + ["", "", "", ""], + ["", "", "", ""], + ], + [ + ["", "", "", ""], + ["", "", "", ""], + ["", "", "", ""], + ["", " ", "", ""], + ], + [ + ["", "", "", ""], + ["", "", "", ""], + ["", "", "⇧", ""], + ["", "⇦", "⇩", "⇨"], + ], + [ + ["", "", "", ""], + ["", "", "", ""], + ["", "", "", ""], + ["", "", "", ""], + ] + ] + self.set_button_text(0) + self.active = 0 + + @edje.decorators.signal_callback("kb_button_mouse_up", "*") + def on_edje_signal_dialer_button_mouse_up(self, emission, source): + now = time.time() + x = int(source[-3:-2]) + y = int(source[-1:]) + key = self.button_labels[self.active][y][x] + self.text.append(key) + self.part_text_set("label", "".join(self.text)) + self.set_button_text(0) + print "mouse up:", time.time()-now + + @edje.decorators.signal_callback("kb_button_mouse_down", "*") + def on_edje_signal_dialer_button_mouse_down(self, emission, source): + now = time.time() + x = int(source[-3:-2]) + y = int(source[-1:]) + num = 4*y+x+1 + if self.active == 0: + self.set_button_text(num) + print "mouse down:", time.time()-now + + + @edje.decorators.signal_callback("kb_mutton_mouse_in", "*") + def on_edje_signal_dialer_button_mouse_in(self, emission, source): + now = time.time() + x = int(source[-3:-2]) + y = int(source[-1:]) + self.part_text_set("label_preview", self.button_labels[self.active][y][x]) + print "mouse in:", time.time()-now + + def set_button_text(self, num): + for i in xrange(4): + for j in xrange(4): + self.part_text_set("label_%d_%d" % (i,j) , self.button_labels[num][j][i]) + self.active = num + + if num != 0: + num = 1 + + for i in xrange(4): + for j in xrange(4): + self.part_text_set("label2_%d_%d" % (i,j) , self.button_labels2[num][j][i]) + +class TestView(object): + def on_key_down(self, obj, event): + if event.keyname in ("F6", "f"): + self.evas_canvas.evas_obj.fullscreen = not self.evas_canvas.evas_obj.fullscreen + elif event.keyname == "Escape": + ecore.main_loop_quit() + + def __init__(self): + self.options, self.args = myOptionParser(usage="usage: %prog [options]").parse_args() + + edje.frametime_set(1.0 / self.options.fps) + + self.evas_canvas = EvasCanvas( + fullscreen=not self.options.no_fullscreen, + engine=self.options.engine, + size=self.options.geometry + ) + + self.groups = {} + for part in ("swallow", "main", "contacts", "power"): + self.groups[part] = edje_group(self, part) + self.evas_canvas.evas_obj.data[part] = self.groups[part] + + self.groups["sms"] = pyphone_sms(self) + self.evas_canvas.evas_obj.data["sms"] = self.groups["sms"] + self.groups["phone"] = pyphone_phone(self) + self.evas_canvas.evas_obj.data["phone"] = self.groups["phone"] + + self.groups["swallow"].show() + self.groups["swallow"].on_key_down_add(self.on_key_down) + + self.groups["swallow"].part_swallow("swallow2", self.groups["main"]) + self.current_group = self.groups["main"] + self.previous_group = self.groups["phone"] + self.in_transition = False + ecore.timer_add(1.0, self.display_time) + self.display_time() + + def display_time(self): + self.groups["main"].part_text_set("label", time.strftime("%H:%M:%S", time.localtime())); + return True; + + def transition_to(self, target): + print "transition to", target + + self.previous_group = self.current_group + + self.current_group = self.groups[target] + self.current_group.signal_emit("visible", "") + self.groups["swallow"].part_swallow("swallow1", self.current_group) + self.previous_group.signal_emit("fadeout", "") + + def transition_finished(self): + print "finished" + self.previous_group.hide() + self.groups["swallow"].part_swallow("swallow2", self.current_group) + + +class EvasCanvas(object): + def __init__(self, fullscreen, engine, size): + if engine == "x11": + f = ecore.evas.SoftwareX11 + elif engine == "x11-16": + if ecore.evas.engine_type_supported_get("software_x11_16"): + f = ecore.evas.SoftwareX11_16 + else: + print "warning: x11-16 is not supported, fallback to x11" + f = ecore.evas.SoftwareX11 + + self.evas_obj = f(w=size[0], h=size[1]) + self.evas_obj.callback_delete_request = self.on_delete_request + self.evas_obj.callback_resize = self.on_resize + + self.evas_obj.title = TITLE + self.evas_obj.name_class = (WM_NAME, WM_CLASS) + self.evas_obj.fullscreen = False #fullscreen + self.evas_obj.size = size + self.evas_obj.show() + + def on_resize(self, evas_obj): + x, y, w, h = evas_obj.evas.viewport + size = (w, h) + for key in evas_obj.data.keys(): + evas_obj.data[key].size = size + + def on_delete_request(self, evas_obj): + ecore.main_loop_quit() + +class myOptionParser(OptionParser): + def __init__(self, usage): + OptionParser.__init__(self, usage) + self.add_option("-e", + "--engine", + type="choice", + choices=("x11", "x11-16"), + default="x11-16", + help=("which display engine to use (x11, x11-16), " + "default=%default")) + self.add_option("-n", + "--no-fullscreen", + action="store_true", + help="do not launch in fullscreen") + self.add_option("-g", + "--geometry", + type="string", + metavar="WxH", + action="callback", + callback=self.parse_geometry, + default=(WIDTH, HEIGHT), + help="use given window geometry") + self.add_option("-f", + "--fps", + type="int", + default=20, + help="frames per second to use, default=%default") + + def parse_geometry(option, opt, value, parser): + try: + w, h = value.split("x") + w = int(w) + h = int(h) + except Exception, e: + raise optparse.OptionValueError("Invalid format for %s" % option) + parser.values.geometry = (w, h) + +class dbus(object): + def __init__(self): + try: + obj = SystemBus(mainloop=e_dbus.DBusEcoreMainLoop()).get_object('org.mobile.gsm', '/org/mobile/gsm/RemoteObject') + except Exception, e: + print e + raise SystemExit + + #connect functions to dbus events + dbus_interface = 'org.mobile.gsm.RemoteInterface' + for fkt in (self.modem_info, self.sim_info, self.network_info, self.gsmCRING, self.gsmNO_CARRIER, self.gsmBUSY, self.error,): + obj.connect_to_signal(fkt.__name__, fkt, dbus_interface=dbus_interface) + gsm = Interface(obj, dbus_interface) + + #get status info on startup + gsm.FireModemInfo() + gsm.FireNetworkInfo() + + def modem_info(self, array): + print array + + def sim_info(self, array): + print array + + def network_info(self, array): + print array + + def gsmBUSY(self, string): + print string + + def gsmCRING(self, string): + print string + + def gsmNO_CARRIER(self, *values): + print values + + def error(self, string): + print string + +if __name__ == "__main__": + TestView() + #dbus() + ecore.main_loop_begin() + +''' +export CPPFLAGS="$CPPFLAGS -I/opt/e17/include" +export LDFLAGS="$LDFLAGS -L/opt/e17/lib" +export PKG_CONFIG_PATH="/opt/e17/lib/pkgconfig:$PKG_CONFIG_PATH" +export PATH="$PATH:/opt/e17/bin" +export PYTHONPATH="/home/josch/usr/lib/python2.5/site-packages" +''' diff --git a/pyphone/pyphone.tar b/pyphone/pyphone.tar new file mode 100644 index 0000000..7ffae2b Binary files /dev/null and b/pyphone/pyphone.tar differ diff --git a/pyphone/pyphone.tar.bz2 b/pyphone/pyphone.tar.bz2 new file mode 100644 index 0000000..b7b385e Binary files /dev/null and b/pyphone/pyphone.tar.bz2 differ diff --git a/pyphone/pyphone_Dialer_theme_mockup.svg b/pyphone/pyphone_Dialer_theme_mockup.svg new file mode 100644 index 0000000..accc9a5 --- /dev/null +++ b/pyphone/pyphone_Dialer_theme_mockup.svg @@ -0,0 +1,480 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 0 + * + # + + + 313373 + + 1337-Mobile 13:37 13.01.08 + + + + + + + + + + + + + + + + + + diff --git a/pyphone/pyphone_Dialer_theme_mockup2.svg b/pyphone/pyphone_Dialer_theme_mockup2.svg new file mode 100644 index 0000000..e368737 --- /dev/null +++ b/pyphone/pyphone_Dialer_theme_mockup2.svg @@ -0,0 +1,613 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 0 + * + # + + C + D + + 313373 + + 1337-Mobile 13:37 13.01.08 + + + + + dialedmissedreceived + + + + + + + + + + + + + diff --git a/pyphone/pyphone_Dialer_theme_mockup3.svg b/pyphone/pyphone_Dialer_theme_mockup3.svg new file mode 100644 index 0000000..c7e27d9 --- /dev/null +++ b/pyphone/pyphone_Dialer_theme_mockup3.svg @@ -0,0 +1,349 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + 1337-Mobile 13:37 13.01.08 + + + + + + + + + + + + + + + + + + + 13:37 + + + + + + + + + + + + + diff --git a/pyphone/pyphone_Dialer_theme_mockup4.svg b/pyphone/pyphone_Dialer_theme_mockup4.svg new file mode 100644 index 0000000..6c43bff --- /dev/null +++ b/pyphone/pyphone_Dialer_theme_mockup4.svg @@ -0,0 +1,374 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + 1337-Mobile 13:37 13.01.08 + + + + + + + + + + + + + 13:37 + + + + + + + + + + + + + + + + + + + + diff --git a/pyphone/pyphone_contacts.edc b/pyphone/pyphone_contacts.edc new file mode 100644 index 0000000..2e9ae26 --- /dev/null +++ b/pyphone/pyphone_contacts.edc @@ -0,0 +1,15 @@ +parts { + SWALLOWCLIP() + + BUTTONS_BOTTOM(); + BUTTON_OPTIONS(); + BUTTON_MENU(); + BUTTON_CLOSE(); +} +programs { + EMIT_TRANSITION("button_bottom_right", "main"); + + ACTIVATE("button_bottom_right"); + + TRANSITION(); +} diff --git a/pyphone/pyphone_phone.edc b/pyphone/pyphone_phone.edc new file mode 100644 index 0000000..db6230a --- /dev/null +++ b/pyphone/pyphone_phone.edc @@ -0,0 +1,428 @@ + +parts { + SWALLOWCLIP() + + part { + name: "label_description"; + type: TEXT; + effect: SOFT_OUTLINE; + mouse_events: 0; + clip_to: "swallow_clip"; + description { + state: "default" 0.0; + rel1 { + relative: 0.0 0.0; + offset: 0 0; + } + rel2 { + relative: 1.0 0.2; + offset: -1 -1; + } + text { + font: "Sans"; + size: 1; + fit: 1 1; + align: 0.0 0.5; + } + } + } + part { + name: "label_background"; + type: RECT; + mouse_events: 0; + clip_to: "swallow_clip"; + description { + state: "default" 0.0; + rel1 { + relative: 0.0 0.2; + offset: 0 0; + to: "background"; + } + rel2 { + relative: 1.0 0.4; + offset: -1 -1; + to: "background"; + } + color: 255 255 255 64; + } + } + part { + name: "label"; + type: TEXT; + effect: SOFT_OUTLINE; + mouse_events: 0; + clip_to: "swallow_clip"; + description { + state: "default" 0.0; + rel1 { + relative: 0.0 0.0; + offset: 0 0; + to: "label_background"; + } + rel2 { + relative: 1.0 1.0; + offset: -1 -1; + to: "label_background"; + } + text { + font: "Sans"; + size: 1; + fit: 1 1; + align: 0.0 0.5; + } + } + } + part { + name: "dialer_box"; + type: RECT; + mouse_events: 0; + clip_to: "swallow_clip"; + description { + state: "default" 0.0; + rel1 { + relative: 0.0 0.42; + offset: 0 0; + to: "background"; + } + rel2 { + relative: 1.0 1.0; + offset: -1 -1; + to: "background"; + } + color: 255 255 255 255; + } + } + + #define DIALER_ICON(part_name, xpos, ypos, label, label2) \ + part { \ + name: "button_"part_name; \ + type: IMAGE; \ + mouse_events: 1; \ + clip_to: "swallow_clip"; \ + description { \ + state: "default" 0.0; \ + rel1 { \ + relative: 0.25*xpos 0.25*ypos; \ + offset: 1 1; \ + to: "dialer_box"; \ + } \ + rel2 { \ + relative: 0.25+(0.25*xpos) 0.25+(0.25*ypos); \ + offset: -2 -2; \ + to: "dialer_box"; \ + } \ + image { normal: "button_background.png"; } \ + } \ + description { \ + state: "active" 0.0; \ + inherit: "default" 0.0; \ + image { normal: "button_background_active.png"; } \ + } \ + } \ + part { \ + name: "label_"part_name; \ + type: TEXT; \ + effect: SOFT_OUTLINE; \ + mouse_events: 0; \ + clip_to: "swallow_clip"; \ + description { \ + state: "default" 0.0; \ + align: 0.5 0.5; \ + rel1 { \ + relative: 0.0 0.0; \ + offset: 0 0; \ + to: "button_"part_name; \ + } \ + rel2 { \ + relative: 1.0 0.8; \ + offset: -1 -1; \ + to: "button_"part_name; \ + } \ + text { \ + font: "Sans"; \ + text: label; \ + size: 1; \ + fit: 1 1; \ + } \ + } \ + } \ + part { \ + name: "label2_"part_name; \ + type: TEXT; \ + effect: SOFT_OUTLINE; \ + mouse_events: 0; \ + clip_to: "swallow_clip"; \ + description { \ + state: "default" 0.0; \ + align: 0.5 0.5; \ + rel1 { \ + relative: 0.0 0.7; \ + offset: 0 0; \ + to: "button_"part_name; \ + } \ + rel2 { \ + relative: 1.0 1.0; \ + offset: -1 -1; \ + to: "button_"part_name; \ + } \ + text { \ + font: "Sans"; \ + text: label2; \ + size: 1; \ + fit: 1 1; \ + } \ + } \ + } + DIALER_ICON("1", 0, 0, "1", ""); + DIALER_ICON("2", 1, 0, "2", "abc"); + DIALER_ICON("3", 2, 0, "3", "def"); + DIALER_ICON("4", 0, 1, "4", "ghi"); + DIALER_ICON("5", 1, 1, "5", "jkl"); + DIALER_ICON("6", 2, 1, "6", "mno"); + DIALER_ICON("7", 0, 2, "7", "pqrs"); + DIALER_ICON("8", 1, 2, "8", "tuv"); + DIALER_ICON("9", 2, 2, "9", "wxyz"); + DIALER_ICON("star", 0, 3, "*", ""); + DIALER_ICON("0", 1, 3, "0", ""); + DIALER_ICON("#", 2, 3, "#", ""); + + + part { + name: "button_delete"; + type: IMAGE; + mouse_events: 1; + clip_to: "swallow_clip"; + description { + state: "default" 0.0; + rel1 { + relative: 0.75 0.0; + offset: 1 1; + to: "dialer_box"; + } + rel2 { + relative: 1.0 0.25; + offset: -2 -2; + to: "dialer_box"; + } + image { normal: "button_background.png"; } + } + description { + state: "active" 0.0; + inherit: "default" 0.0; + image { normal: "button_background_active.png"; } + } + } + part { + name: "icon_delete"; + mouse_events: 0; + type: IMAGE; + clip_to: "swallow_clip"; + description { + state: "default" 0.0; + aspect: 1.0 1.0; + aspect_preference: BOTH; + rel1 { + relative: 0.0 0.0; + offset: 0 0; + to: "button_delete"; + } + rel2 { + relative: 1.0 1.0; + offset: -1 -1; + to: "button_delete"; + } + image { normal: "icon_left.png"; } + } + } + part { + name: "button_dial"; + type: IMAGE; + mouse_events: 1; + clip_to: "swallow_clip"; + description { + state: "default" 0.0; + rel1 { + relative: 0.75 0.25; + offset: 1 1; + to: "dialer_box"; + } + rel2 { + relative: 1.0 0.75; + offset: -2 -2; + to: "dialer_box"; + } + image { normal: "button_background.png"; } + } + description { + state: "active" 0.0; + inherit: "default" 0.0; + image { normal: "button_background_active.png"; } + } + } + part { + name: "icon_dial"; + mouse_events: 0; + type: IMAGE; + clip_to: "swallow_clip"; + description { + state: "default" 0.0; + aspect: 1.0 1.0; + aspect_preference: BOTH; + rel1 { + relative: 0.0 0.0; + offset: 0 0; + to: "button_dial"; + } + rel2 { + relative: 1.0 1.0; + offset: -1 -1; + to: "button_dial"; + } + image { normal: "icon_accept.png"; } + } + } + part { + name: "button_left"; + type: IMAGE; + mouse_events: 1; + clip_to: "swallow_clip"; + description { + state: "default" 0.0; + rel1 { + relative: 0.75 0.75; + offset: 1 1; + to: "dialer_box"; + } + rel2 { + relative: 0.875 1.0; + offset: -2 -2; + to: "dialer_box"; + } + image { normal: "button_background.png"; } + } + description { + state: "active" 0.0; + inherit: "default" 0.0; + image { normal: "button_background_active.png"; } + } + } + part { + name: "icon_left"; + mouse_events: 0; + type: IMAGE; + clip_to: "swallow_clip"; + description { + state: "default" 0.0; + aspect: 1.0 1.0; + aspect_preference: BOTH; + rel1 { + relative: 0.0 0.0; + offset: 0 0; + to: "button_left"; + } + rel2 { + relative: 1.0 1.0; + offset: -1 -1; + to: "button_left"; + } + image { normal: "icon_left.png"; } + } + } + part { + name: "button_right"; + type: IMAGE; + mouse_events: 1; + clip_to: "swallow_clip"; + description { + state: "default" 0.0; + rel1 { + relative: 0.875 0.75; + offset: 1 1; + to: "dialer_box"; + } + rel2 { + relative: 1.0 1.0; + offset: -2 -2; + to: "dialer_box"; + } + image { normal: "button_background.png"; } + } + description { + state: "active" 0.0; + inherit: "default" 0.0; + image { normal: "button_background_active.png"; } + } + } + part { + name: "icon_right"; + mouse_events: 0; + type: IMAGE; + clip_to: "swallow_clip"; + description { + state: "default" 0.0; + aspect: 1.0 1.0; + aspect_preference: BOTH; + rel1 { + relative: 0.0 0.0; + offset: 0 0; + to: "button_right"; + } + rel2 { + relative: 1.0 1.0; + offset: -1 -1; + to: "button_right"; + } + image { normal: "icon_right.png"; } + } + } + + BUTTONS_BOTTOM(); + BUTTON_OPTIONS(); + BUTTON_MENU(); + BUTTON_CLOSE(); +} +programs { + EMIT_TRANSITION("button_bottom_right", "main"); + + ACTIVATE("button_bottom_right"); + + ACTIVATE("button_1"); + ACTIVATE("button_2"); + ACTIVATE("button_3"); + ACTIVATE("button_4"); + ACTIVATE("button_5"); + ACTIVATE("button_6"); + ACTIVATE("button_7"); + ACTIVATE("button_8"); + ACTIVATE("button_9"); + ACTIVATE("button_0"); + ACTIVATE("button_#"); + ACTIVATE("button_star"); + ACTIVATE("button_delete"); + ACTIVATE("button_dial"); + + #define EMIT_DIALER_BUTTON_PRESSED(part_name) \ + program { \ + name: "emit_dialer_button_pressed_"part_name; \ + signal: "mouse,clicked,1"; \ + source: part_name; \ + action: SIGNAL_EMIT "dialer_button_pressed" part_name; \ + } + + EMIT_DIALER_BUTTON_PRESSED("button_1"); + EMIT_DIALER_BUTTON_PRESSED("button_2"); + EMIT_DIALER_BUTTON_PRESSED("button_3"); + EMIT_DIALER_BUTTON_PRESSED("button_4"); + EMIT_DIALER_BUTTON_PRESSED("button_5"); + EMIT_DIALER_BUTTON_PRESSED("button_6"); + EMIT_DIALER_BUTTON_PRESSED("button_7"); + EMIT_DIALER_BUTTON_PRESSED("button_8"); + EMIT_DIALER_BUTTON_PRESSED("button_9"); + EMIT_DIALER_BUTTON_PRESSED("button_0"); + EMIT_DIALER_BUTTON_PRESSED("button_#"); + EMIT_DIALER_BUTTON_PRESSED("button_star"); + EMIT_DIALER_BUTTON_PRESSED("button_delete"); + EMIT_DIALER_BUTTON_PRESSED("button_dial"); + + TRANSITION(); +} diff --git a/pyphone/pyphone_power.edc b/pyphone/pyphone_power.edc new file mode 100644 index 0000000..2e9ae26 --- /dev/null +++ b/pyphone/pyphone_power.edc @@ -0,0 +1,15 @@ +parts { + SWALLOWCLIP() + + BUTTONS_BOTTOM(); + BUTTON_OPTIONS(); + BUTTON_MENU(); + BUTTON_CLOSE(); +} +programs { + EMIT_TRANSITION("button_bottom_right", "main"); + + ACTIVATE("button_bottom_right"); + + TRANSITION(); +} diff --git a/pyphone/pyphone_sms.edc b/pyphone/pyphone_sms.edc new file mode 100644 index 0000000..576e598 --- /dev/null +++ b/pyphone/pyphone_sms.edc @@ -0,0 +1,327 @@ + +parts { + SWALLOWCLIP() + + part { + name: "label_background"; + type: RECT; + mouse_events: 0; + clip_to: "swallow_clip"; + description { + state: "default" 0.0; + rel1 { + relative: 0.0 0.1; + offset: 0 0; + to: "background"; + } + rel2 { + relative: 1.0 0.4; + offset: -1 -1; + to: "background"; + } + color: 255 255 255 64; + } + } + part { + name: "label"; + type: TEXT; + effect: SOFT_OUTLINE; + mouse_events: 0; + clip_to: "swallow_clip"; + description { + state: "default" 0.0; + rel1 { + relative: 0.0 0.2; + offset: 0 0; + to: "label_background"; + } + rel2 { + relative: 1.0 0.8; + offset: -1 -1; + to: "label_background"; + } + text { + font: "Sans"; + size: 1; + fit: 1 1; + align: 0.0 0.5; + } + } + } + part { + name: "kb_box"; + type: RECT; + mouse_events: 0; + clip_to: "swallow_clip"; + description { + state: "default" 0.0; + rel1 { + relative: 0.0 0.42; + offset: 0 0; + to: "background"; + } + rel2 { + relative: 1.0 1.0; + offset: -1 -1; + to: "background"; + } + color: 255 255 255 255; + } + } + + #define KB_ICON(xpos, ypos) \ + part { \ + name: "button_"xpos"_"ypos; \ + type: IMAGE; \ + mouse_events: 1; \ + pointer_mode: NOGRAB; \ + clip_to: "swallow_clip"; \ + description { \ + state: "default" 0.0; \ + rel1 { \ + relative: 0.25*xpos 0.25*ypos; \ + offset: 1 1; \ + to: "kb_box"; \ + } \ + rel2 { \ + relative: 0.25+(0.25*xpos) 0.25+(0.25*ypos); \ + offset: -2 -2; \ + to: "kb_box"; \ + } \ + image { normal: "button_background.png"; } \ + } \ + description { \ + state: "active" 0.0; \ + inherit: "default" 0.0; \ + image { normal: "button_background_active.png"; } \ + } \ + } \ + part { \ + name: "label_"xpos"_"ypos; \ + type: TEXT; \ + effect: SOFT_OUTLINE; \ + mouse_events: 0; \ + clip_to: "swallow_clip"; \ + description { \ + state: "default" 0.0; \ + align: 0.5 0.5; \ + rel1 { \ + relative: 0.0 0.0; \ + offset: 0 0; \ + to: "button_"xpos"_"ypos; \ + } \ + rel2 { \ + relative: 1.0 0.8; \ + offset: -1 -1; \ + to: "button_"xpos"_"ypos; \ + } \ + text { \ + font: "Sans"; \ + size: 1; \ + fit: 1 1; \ + } \ + } \ + } \ + part { \ + name: "label2_"xpos"_"ypos; \ + type: TEXT; \ + effect: SOFT_OUTLINE; \ + mouse_events: 0; \ + clip_to: "swallow_clip"; \ + description { \ + state: "default" 0.0; \ + align: 0.5 0.5; \ + rel1 { \ + relative: 0.0 0.7; \ + offset: 0 0; \ + to: "button_"xpos"_"ypos; \ + } \ + rel2 { \ + relative: 1.0 1.0; \ + offset: -1 -1; \ + to: "button_"xpos"_"ypos; \ + } \ + text { \ + font: "Sans"; \ + size: 1; \ + fit: 1 1; \ + } \ + } \ + } + KB_ICON(0, 0); + KB_ICON(1, 0); + KB_ICON(2, 0); + KB_ICON(3, 0); + KB_ICON(0, 1); + KB_ICON(1, 1); + KB_ICON(2, 1); + KB_ICON(3, 1); + KB_ICON(0, 2); + KB_ICON(1, 2); + KB_ICON(2, 2); + KB_ICON(3, 2); + KB_ICON(0, 3); + KB_ICON(1, 3); + KB_ICON(2, 3); + KB_ICON(3, 3); + + part { + name: "preview_box"; + mouse_events: 0; + type: IMAGE; + clip_to: "swallow_clip"; + description { + state: "default" 0.0; + rel1 { + relative: 0.2 0.1; + } + rel2 { + relative: 0.8 0.35; + } + image { + normal: "button_main_background.png"; + border: 27 27 27 27; + } + visible: 0; + } + description { + state: "visible" 0.0; + inherit: "default" 0.0; + visible: 1; + } + } + part { + name: "label_preview"; + type: TEXT; + effect: SOFT_OUTLINE; + mouse_events: 0; + clip_to: "swallow_clip"; + description { + state: "default" 0.0; + align: 0.5 0.5; + rel1 { + relative: 0.0 0.0; + offset: 0 0; + to: "preview_box"; + } + rel2 { + relative: 1.0 1.0; + offset: -1 -1; + to: "preview_box"; + } + text { + font: "Sans"; + size: 1; + fit: 1 1; + } + visible: 0; + } + description { + state: "visible" 0.0; + inherit: "default" 0.0; + visible: 1; + } + } + + BUTTONS_BOTTOM(); + BUTTON_OPTIONS(); + BUTTON_MENU(); + BUTTON_CLOSE(); +} +programs { + EMIT_TRANSITION("button_bottom_right", "main"); + + ACTIVATE("button_bottom_right"); + + ACTIVATE("button_0_0"); + ACTIVATE("button_0_1"); + ACTIVATE("button_0_2"); + ACTIVATE("button_0_3"); + ACTIVATE("button_1_0"); + ACTIVATE("button_1_1"); + ACTIVATE("button_1_2"); + ACTIVATE("button_1_3"); + ACTIVATE("button_2_0"); + ACTIVATE("button_2_1"); + ACTIVATE("button_2_2"); + ACTIVATE("button_2_3"); + ACTIVATE("button_3_0"); + ACTIVATE("button_3_1"); + ACTIVATE("button_3_2"); + ACTIVATE("button_3_3"); + + program { + name: "show_preview"; + action: STATE_SET "visible" 0.0; + target: "preview_box"; + target: "label_preview"; + } + program { + name: "hide_preview"; + action: STATE_SET "normal" 0.0; + target: "preview_box"; + target: "label_preview"; + after: "deactivate_all"; + } + program { + name: "deactivate_all"; + action: STATE_SET "normal" 0.0; + target: "button_0_0"; + target: "button_0_1"; + target: "button_0_2"; + target: "button_0_3"; + target: "button_1_0"; + target: "button_1_1"; + target: "button_1_2"; + target: "button_1_3"; + target: "button_2_0"; + target: "button_2_1"; + target: "button_2_2"; + target: "button_2_3"; + target: "button_3_0"; + target: "button_3_1"; + target: "button_3_2"; + target: "button_3_3"; + } + + #define EMIT_KB_BUTTON_PRESSED(part_name) \ + program { \ + name: "emit_kb_button_mouse_down_"part_name; \ + signal: "mouse,down,1"; \ + source: part_name; \ + action: SIGNAL_EMIT "kb_button_mouse_down" part_name; \ + after: "show_preview"; \ + } \ + program { \ + name: "emit_kb_button_mouse_up_"part_name; \ + signal: "mouse,up,1"; \ + source: part_name; \ + action: SIGNAL_EMIT "kb_button_mouse_up" part_name; \ + after: "hide_preview"; \ + } \ + program { \ + name: "emit_kb_button_mouse_in_"part_name; \ + signal: "mouse,in"; \ + source: part_name; \ + action: SIGNAL_EMIT "kb_mutton_mouse_in" part_name; \ + } + + EMIT_KB_BUTTON_PRESSED("button_0_0"); + EMIT_KB_BUTTON_PRESSED("button_0_1"); + EMIT_KB_BUTTON_PRESSED("button_0_2"); + EMIT_KB_BUTTON_PRESSED("button_0_3"); + EMIT_KB_BUTTON_PRESSED("button_1_0"); + EMIT_KB_BUTTON_PRESSED("button_1_1"); + EMIT_KB_BUTTON_PRESSED("button_1_2"); + EMIT_KB_BUTTON_PRESSED("button_1_3"); + EMIT_KB_BUTTON_PRESSED("button_2_0"); + EMIT_KB_BUTTON_PRESSED("button_2_1"); + EMIT_KB_BUTTON_PRESSED("button_2_2"); + EMIT_KB_BUTTON_PRESSED("button_2_3"); + EMIT_KB_BUTTON_PRESSED("button_3_0"); + EMIT_KB_BUTTON_PRESSED("button_3_1"); + EMIT_KB_BUTTON_PRESSED("button_3_2"); + EMIT_KB_BUTTON_PRESSED("button_3_3"); + + TRANSITION(); +} diff --git a/pyphone/pyphone_sms_theme_mockup.svg b/pyphone/pyphone_sms_theme_mockup.svg new file mode 100644 index 0000000..3589dd1 --- /dev/null +++ b/pyphone/pyphone_sms_theme_mockup.svg @@ -0,0 +1,474 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 0 + * + # + + + 313373 + + 1337-Mobile 13:37 13.01.08 + + + + + + + + + + + + + + + + + diff --git a/pyphone/pyphonemockup.svg b/pyphone/pyphonemockup.svg new file mode 100644 index 0000000..ce30ec7 --- /dev/null +++ b/pyphone/pyphonemockup.svg @@ -0,0 +1,1287 @@ + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + pow + + tele + + sms + + addr + + provider:signal quality: + > info> power on/off> un/register> lock> un/mute> settings + timedate + + back + + + + back + + opts + + + pin dialog + + + convenientscreen locker + + > dialed> missed> received + + DIALER + + + subscriber number:location area code:cell id:pin state:clock:phone status: + + + back + + opts + + + back + + opts + + > Contact A> Contact B> Contact C> Contact D> Contact E> .... + + > call> sms> edit> delete> new> contact hist + + keyboard + receipent + message text + + + back + > new> received> sent> drafts> templates + + + + back + + opts + > Contact A> Contact B> Number A> Contact C> Number B> .... + + + + + > call> sms> new contact> contact hist + + currentcall? + + + back + + + + + call with:time: + + handsfree + + + + > do> what> you> want + + back + + + + > send> save> multiple rec + + + + back + + opts + > Message A> Message B> Message C> Message D> Message E> .... + + + + + + > open> reply> delete> edit> contact hist> call> new contact + + + + + + back + + opts + from:date:time:text: + + + > reply> delete> edit> contact hist> call> new contact + + DIALER + + diff --git a/pyphone/pythonefl.tar.bz2 b/pyphone/pythonefl.tar.bz2 new file mode 100644 index 0000000..2f9338b Binary files /dev/null and b/pyphone/pythonefl.tar.bz2 differ diff --git a/pyphone/rial b/pyphone/rial new file mode 100644 index 0000000..933d356 --- /dev/null +++ b/pyphone/rial @@ -0,0 +1,48 @@ +Secure Locate 3.1 - Released March 7, 2006 +Copyright (c) 2005 Kevin Lindsay + +Search: locate [-qi] [-d ] [--database=] + + locate [-r ] [--regexp=] +Update database: locate [-qv] [-o ] [--output=] + locate [-e ] [-f ] [-l ] + [-c ] <[-U ] [-u]> +General: locate [-Vh] [--version] [--help] + + Options: + -u - Create slocate database starting at path /. + -U - Create slocate database starting at path . + -c - Parse original GNU Locate's configuration file + when using the -u or -U options. If 'updatedb' is + symbolically linked to the 'locate' binary, the + original configuration file '/etc/updatedb.conf' will + automatically be used. + -e - Exclude directories from the slocate database when + using the -u or -U options. + -f - Exclude file system types from the slocate database + when using the -u or -U options. (ie. NFS, etc). + -l - Security level. + 0 turns security checks off. This will make + searchs faster. + 1 turns security checks on. This is the default. + -q - Quiet mode. Error messages are suppressed. + -n - Limit the amount of results shown to . + -i - Does a case insensitive search. + -r + --regexp= - Search the database using a basic POSIX regular + expression. + -o + --output= - Specifies the database to create. + -d + --database= - Specfies the path of databases to search in. + -h + --help - Display this help. + -v + --verbose - Verbose mode. Display files when creating database. + -V + --version - Display version. + +Author: Kevin Lindsay +Bugs: slocate@trakker.ca +HTTP: http://slocate.trakker.ca/ +