Send commitlog mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        http://lists.openmoko.org/mailman/listinfo/commitlog
or, via email, send a message with subject or body 'help' to
        [EMAIL PROTECTED]

You can reach the person managing the list at
        [EMAIL PROTECTED]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of commitlog digest..."
Today's Topics:

   1. r2956 - trunk/src/target/OM-2007.2/daemons/neod/src
      ([EMAIL PROTECTED])
   2. r2957 - trunk/src/target/gsm/src/util ([EMAIL PROTECTED])
   3. r2958 -
      trunk/src/target/OM-2007.2/libraries/libmokopanelui2/libmokopanelui
      ([EMAIL PROTECTED])
   4. r2959 -
      trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/src
      ([EMAIL PROTECTED])
--- Begin Message ---
Author: mickey
Date: 2007-09-12 16:28:14 +0200 (Wed, 12 Sep 2007)
New Revision: 2956

Modified:
   trunk/src/target/OM-2007.2/daemons/neod/src/buttonactions.c
Log:
neod: get the name of the (first) backlight device node from sysfs
This makes neod controlling brightness on all devices with LCD backlight class


Modified: trunk/src/target/OM-2007.2/daemons/neod/src/buttonactions.c
===================================================================
--- trunk/src/target/OM-2007.2/daemons/neod/src/buttonactions.c 2007-09-11 
20:41:25 UTC (rev 2955)
+++ trunk/src/target/OM-2007.2/daemons/neod/src/buttonactions.c 2007-09-12 
14:28:14 UTC (rev 2956)
@@ -42,9 +42,11 @@
 #undef DEBUG_THIS_FILE
 //#define DEBUG_THIS_FILE
 
-//FIXME load this from sysfs
-static const int MAX_BRIGHTNESS = 5000;
+#define SYS_CLASS_BACKLIGHT "/sys/class/backlight/"
 
+static gchar* backlight_node = NULL;
+static int backlight_max_brightness = 1;
+
 #define AUX_BUTTON_KEYCODE 0x22
 #define POWER_BUTTON_KEYCODE 0x23
 #define TOUCHSCREEN_BUTTON_KEYCODE 0x14a
@@ -676,14 +678,49 @@
 
 void neod_buttonactions_set_display( int brightness )
 {
-    g_debug( "mainmenu set display %d", brightness );
-    int fd = g_open( "/sys/class/backlight/gta01-bl/brightness", O_WRONLY, 0 );
+    g_debug( "requested to set display brightness %d", brightness );
+
+    if ( !backlight_node )
+    {
+        GDir* backlight_class_dir = g_dir_open( SYS_CLASS_BACKLIGHT, 0, NULL );
+        if ( backlight_class_dir )
+        {
+            const gchar* backlight_node_dir = g_dir_read_name( 
backlight_class_dir );
+            if ( backlight_node_dir )
+            {
+                g_debug( "backlight_node_dir = %s", backlight_node_dir );
+                backlight_node = g_strdup_printf( SYS_CLASS_BACKLIGHT 
"%s/brightness", backlight_node_dir );
+                g_debug( "detected backlight in sysfs as '%s'", backlight_node 
);
+                const gchar* backlight_node_max_brightness = g_strdup_printf( 
SYS_CLASS_BACKLIGHT "%s/max_brightness", backlight_node_dir );
+
+                FILE* f = fopen( backlight_node_max_brightness, "r" );
+                if ( f == NULL )
+                {
+                    g_debug( "can't open max brightness '%s': (%s), 
aborting.", backlight_node_max_brightness, strerror( errno ) );
+                    g_dir_close( backlight_class_dir );
+                    return;
+                }
+                fscanf( f, "%d", &backlight_max_brightness );
+                fclose( f );
+                g_debug( "scanned maximum brightness for '%s' = '%d'", 
backlight_node, backlight_max_brightness );
+                g_dir_close( backlight_class_dir );
+            }
+        }
+        else
+        {
+            g_debug( "can't open '%s': (%s), aborting.", SYS_CLASS_BACKLIGHT, 
strerror( errno ) );
+            return;
+        }
+    }
+
+    int fd = g_open( backlight_node, O_WRONLY, 0 );
     if ( fd == -1 )
-        g_debug( "can't open backlight device: %s", strerror( errno ) );
+        g_debug( "can't open backlight device '%s'(%s)", backlight_node, 
strerror( errno ) );
     else
     {
         char buf[10];
-        int numbytes = g_sprintf( buf, "%d\0", MAX_BRIGHTNESS / 100 * 
(brightness+1 ) );
+        int numbytes = g_sprintf( buf, "%d\0", backlight_max_brightness * 
brightness / 100 );
+        g_debug( "writing '%s' to '%s'", buf, backlight_node );
         write( fd, buf, numbytes );
         close( fd );
     }




--- End Message ---
--- Begin Message ---
Author: jserv
Date: 2007-09-12 19:32:23 +0200 (Wed, 12 Sep 2007)
New Revision: 2957

Modified:
   trunk/src/target/gsm/src/util/atcmd.c
Log:
Fixlet to libgsmd-tool does not flush stdout in atcmd mode.
PR833 - http://bugzilla.openmoko.org/cgi-bin/bugzilla/show_bug.cgi?id=833


Modified: trunk/src/target/gsm/src/util/atcmd.c
===================================================================
--- trunk/src/target/gsm/src/util/atcmd.c       2007-09-12 14:28:14 UTC (rev 
2956)
+++ trunk/src/target/gsm/src/util/atcmd.c       2007-09-12 17:32:23 UTC (rev 
2957)
@@ -96,6 +96,8 @@
                         * command */
                        lgsm_passthrough(lgsmh, buf, rbuf, &rlen);
                        printf("RSTR=`%s'\n", rbuf);
+
+                       fflush(stdout);
                }
        }
 }




--- End Message ---
--- Begin Message ---
Author: mickey
Date: 2007-09-12 19:33:29 +0200 (Wed, 12 Sep 2007)
New Revision: 2958

Removed:
   
trunk/src/target/OM-2007.2/libraries/libmokopanelui2/libmokopanelui/Makefile.in
Modified:
   
trunk/src/target/OM-2007.2/libraries/libmokopanelui2/libmokopanelui/moko-panel-applet.c
Log:
libmokopanelui: remove generated Makefile.in, try to fix rescaling bug wrt. 
MBPanelScaledImage


Deleted: 
trunk/src/target/OM-2007.2/libraries/libmokopanelui2/libmokopanelui/Makefile.in
===================================================================
--- 
trunk/src/target/OM-2007.2/libraries/libmokopanelui2/libmokopanelui/Makefile.in 
    2007-09-12 17:32:23 UTC (rev 2957)
+++ 
trunk/src/target/OM-2007.2/libraries/libmokopanelui2/libmokopanelui/Makefile.in 
    2007-09-12 17:33:29 UTC (rev 2958)
@@ -1,516 +0,0 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005  Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
[EMAIL PROTECTED]@
-
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ..
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-subdir = libmokopanelui
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
-       $(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES =
-am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
-am__vpath_adj = case $$p in \
-    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
-    *) f=$$p;; \
-  esac;
-am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
-am__installdirs = "$(DESTDIR)$(libdir)" \
-       "$(DESTDIR)$(libmokopanelui2headersdir)"
-libLTLIBRARIES_INSTALL = $(INSTALL)
-LTLIBRARIES = $(lib_LTLIBRARIES)
-libmokopanelui2_la_DEPENDENCIES =
-am__objects_1 = moko-panel-applet.lo
-am__objects_2 =
-am_libmokopanelui2_la_OBJECTS = $(am__objects_1) $(am__objects_2)
-libmokopanelui2_la_OBJECTS = $(am_libmokopanelui2_la_OBJECTS)
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
-depcomp = $(SHELL) $(top_srcdir)/depcomp
-am__depfiles_maybe = depfiles
-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
-       $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
-       $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
-       $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-       $(AM_LDFLAGS) $(LDFLAGS) -o $@
-SOURCES = $(libmokopanelui2_la_SOURCES)
-DIST_SOURCES = $(libmokopanelui2_la_SOURCES)
-libmokopanelui2headersDATA_INSTALL = $(INSTALL_DATA)
-DATA = $(libmokopanelui2headers_DATA)
-ETAGS = etags
-CTAGS = ctags
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
-AMTAR = @AMTAR@
-AR = @AR@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CATALOGS = @CATALOGS@
-CATOBJEXT = @CATOBJEXT@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DATADIRNAME = @DATADIRNAME@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DEPS_CFLAGS = @DEPS_CFLAGS@
-DEPS_LIBS = @DEPS_LIBS@
-ECHO = @ECHO@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-F77 = @F77@
-FFLAGS = @FFLAGS@
-GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
-GMOFILES = @GMOFILES@
-GMSGFMT = @GMSGFMT@
-GREP = @GREP@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-INSTOBJEXT = @INSTOBJEXT@
-INTLLIBS = @INTLLIBS@
-LDFLAGS = @LDFLAGS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBTOOL = @LIBTOOL@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
-MAKEINFO = @MAKEINFO@
-MKINSTALLDIRS = @MKINSTALLDIRS@
-MSGFMT = @MSGFMT@
-MSGFMT_OPTS = @MSGFMT_OPTS@
-OBJEXT = @OBJEXT@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PKG_CONFIG = @PKG_CONFIG@
-POFILES = @POFILES@
-POSUB = @POSUB@
-PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
-PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
-RANLIB = @RANLIB@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-STRIP = @STRIP@
-USE_NLS = @USE_NLS@
-VERSION = @VERSION@
-XGETTEXT = @XGETTEXT@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-sysconfdir = @sysconfdir@
-target_alias = @target_alias@
-source_h = \
-       moko-panel-applet.h
-
-source_c = \
-       moko-panel-applet.c
-
-DATADIR = $(datadir)
-AM_CPPFLAGS = -DDATADIR=\"$(datadir)\" \
-              -DPKGDATADIR=\"$(pkgdatadir)\"
-
-AM_CFLAGS = -Wall -pedantic -std=c99
-lib_LTLIBRARIES = libmokopanelui2.la
-libmokopanelui2_la_SOURCES = $(source_c) $(source_h)
-libmokopanelui2_la_LIBADD = 
-libmokopanelui2_la_LDFLAGS = -version-info 0:3:0
-libmokopanelui2headersdir = $(includedir)/libmokopanelui2
-libmokopanelui2headers_DATA = $(source_h)
-all: all-am
-
-.SUFFIXES:
-.SUFFIXES: .c .lo .o .obj
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  
$(am__configure_deps)
-       @for dep in $?; do \
-         case '$(am__configure_deps)' in \
-           *$$dep*) \
-             cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-               && exit 0; \
-             exit 1;; \
-         esac; \
-       done; \
-       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  libmokopanelui/Makefile'; 
\
-       cd $(top_srcdir) && \
-         $(AUTOMAKE) --gnu  libmokopanelui/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-       @case '$?' in \
-         *config.status*) \
-           cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
-         *) \
-           echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ 
$(am__depfiles_maybe)'; \
-           cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ 
$(am__depfiles_maybe);; \
-       esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure 
$(CONFIG_STATUS_DEPENDENCIES)
-       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
-       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
-       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-install-libLTLIBRARIES: $(lib_LTLIBRARIES)
-       @$(NORMAL_INSTALL)
-       test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
-       @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
-         if test -f $$p; then \
-           f=$(am__strip_dir) \
-           echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) 
$(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
-           $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) 
$(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
-         else :; fi; \
-       done
-
-uninstall-libLTLIBRARIES:
-       @$(NORMAL_UNINSTALL)
-       @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \
-         p=$(am__strip_dir) \
-         echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
-         $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
-       done
-
-clean-libLTLIBRARIES:
-       -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
-       @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
-         dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
-         test "$$dir" != "$$p" || dir=.; \
-         echo "rm -f \"$${dir}/so_locations\""; \
-         rm -f "$${dir}/so_locations"; \
-       done
-libmokopanelui2.la: $(libmokopanelui2_la_OBJECTS) 
$(libmokopanelui2_la_DEPENDENCIES) 
-       $(LINK) -rpath $(libdir) $(libmokopanelui2_la_LDFLAGS) 
$(libmokopanelui2_la_OBJECTS) $(libmokopanelui2_la_LIBADD) $(LIBS)
-
-mostlyclean-compile:
-       -rm -f *.$(OBJEXT)
-
-distclean-compile:
-       -rm -f *.tab.c
-
[EMAIL PROTECTED]@@am__include@ @[EMAIL PROTECTED]/$(DEPDIR)/[EMAIL PROTECTED]@
-
-.c.o:
[EMAIL PROTECTED]@      if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c 
-o $@ $<; \
[EMAIL PROTECTED]@      then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else 
rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
[EMAIL PROTECTED]@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no 
@AMDEPBACKSLASH@
[EMAIL PROTECTED]@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) 
$(depcomp) @AMDEPBACKSLASH@
[EMAIL PROTECTED]@      $(COMPILE) -c $<
-
-.c.obj:
[EMAIL PROTECTED]@      if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c 
-o $@ `$(CYGPATH_W) '$<'`; \
[EMAIL PROTECTED]@      then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else 
rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
[EMAIL PROTECTED]@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no 
@AMDEPBACKSLASH@
[EMAIL PROTECTED]@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) 
$(depcomp) @AMDEPBACKSLASH@
[EMAIL PROTECTED]@      $(COMPILE) -c `$(CYGPATH_W) '$<'`
-
-.c.lo:
[EMAIL PROTECTED]@      if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" 
-c -o $@ $<; \
[EMAIL PROTECTED]@      then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else 
rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
[EMAIL PROTECTED]@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes 
@AMDEPBACKSLASH@
[EMAIL PROTECTED]@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) 
$(depcomp) @AMDEPBACKSLASH@
[EMAIL PROTECTED]@      $(LTCOMPILE) -c -o $@ $<
-
-mostlyclean-libtool:
-       -rm -f *.lo
-
-clean-libtool:
-       -rm -rf .libs _libs
-
-distclean-libtool:
-       -rm -f libtool
-uninstall-info-am:
-install-libmokopanelui2headersDATA: $(libmokopanelui2headers_DATA)
-       @$(NORMAL_INSTALL)
-       test -z "$(libmokopanelui2headersdir)" || $(mkdir_p) 
"$(DESTDIR)$(libmokopanelui2headersdir)"
-       @list='$(libmokopanelui2headers_DATA)'; for p in $$list; do \
-         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         f=$(am__strip_dir) \
-         echo " $(libmokopanelui2headersDATA_INSTALL) '$$d$$p' 
'$(DESTDIR)$(libmokopanelui2headersdir)/$$f'"; \
-         $(libmokopanelui2headersDATA_INSTALL) "$$d$$p" 
"$(DESTDIR)$(libmokopanelui2headersdir)/$$f"; \
-       done
-
-uninstall-libmokopanelui2headersDATA:
-       @$(NORMAL_UNINSTALL)
-       @list='$(libmokopanelui2headers_DATA)'; for p in $$list; do \
-         f=$(am__strip_dir) \
-         echo " rm -f '$(DESTDIR)$(libmokopanelui2headersdir)/$$f'"; \
-         rm -f "$(DESTDIR)$(libmokopanelui2headersdir)/$$f"; \
-       done
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
-       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
-       mkid -fID $$unique
-tags: TAGS
-
-TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-               $(TAGS_FILES) $(LISP)
-       tags=; \
-       here=`pwd`; \
-       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
-       if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
-         test -n "$$unique" || unique=$$empty_fix; \
-         $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-           $$tags $$unique; \
-       fi
-ctags: CTAGS
-CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-               $(TAGS_FILES) $(LISP)
-       tags=; \
-       here=`pwd`; \
-       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
-       test -z "$(CTAGS_ARGS)$$tags$$unique" \
-         || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-            $$tags $$unique
-
-GTAGS:
-       here=`$(am__cd) $(top_builddir) && pwd` \
-         && cd $(top_srcdir) \
-         && gtags -i $(GTAGS_ARGS) $$here
-
-distclean-tags:
-       -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
-       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-       list='$(DISTFILES)'; for file in $$list; do \
-         case $$file in \
-           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-           $(top_srcdir)/*) file=`echo "$$file" | sed 
"s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-         esac; \
-         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-           dir="/$$dir"; \
-           $(mkdir_p) "$(distdir)$$dir"; \
-         else \
-           dir=''; \
-         fi; \
-         if test -d $$d/$$file; then \
-           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
-           fi; \
-           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
-         else \
-           test -f $(distdir)/$$file \
-           || cp -p $$d/$$file $(distdir)/$$file \
-           || exit 1; \
-         fi; \
-       done
-check-am: all-am
-check: check-am
-all-am: Makefile $(LTLIBRARIES) $(DATA)
-installdirs:
-       for dir in "$(DESTDIR)$(libdir)" 
"$(DESTDIR)$(libmokopanelui2headersdir)"; do \
-         test -z "$$dir" || $(mkdir_p) "$$dir"; \
-       done
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
-       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-         `test -z '$(STRIP)' || \
-           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
-       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-
-maintainer-clean-generic:
-       @echo "This command is intended for maintainers to use"
-       @echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
-       mostlyclean-am
-
-distclean: distclean-am
-       -rm -rf ./$(DEPDIR)
-       -rm -f Makefile
-distclean-am: clean-am distclean-compile distclean-generic \
-       distclean-libtool distclean-tags
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-info: info-am
-
-info-am:
-
-install-data-am: install-libmokopanelui2headersDATA
-
-install-exec-am: install-libLTLIBRARIES
-
-install-info: install-info-am
-
-install-man:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
-       -rm -rf ./$(DEPDIR)
-       -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-compile mostlyclean-generic \
-       mostlyclean-libtool
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES \
-       uninstall-libmokopanelui2headersDATA
-
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
-       clean-libLTLIBRARIES clean-libtool ctags distclean \
-       distclean-compile distclean-generic distclean-libtool \
-       distclean-tags distdir dvi dvi-am html html-am info info-am \
-       install install-am install-data install-data-am install-exec \
-       install-exec-am install-info install-info-am \
-       install-libLTLIBRARIES install-libmokopanelui2headersDATA \
-       install-man install-strip installcheck installcheck-am \
-       installdirs maintainer-clean maintainer-clean-generic \
-       mostlyclean mostlyclean-compile mostlyclean-generic \
-       mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
-       uninstall-am uninstall-info-am uninstall-libLTLIBRARIES \
-       uninstall-libmokopanelui2headersDATA
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:

Modified: 
trunk/src/target/OM-2007.2/libraries/libmokopanelui2/libmokopanelui/moko-panel-applet.c
===================================================================
--- 
trunk/src/target/OM-2007.2/libraries/libmokopanelui2/libmokopanelui/moko-panel-applet.c
     2007-09-12 17:32:23 UTC (rev 2957)
+++ 
trunk/src/target/OM-2007.2/libraries/libmokopanelui2/libmokopanelui/moko-panel-applet.c
     2007-09-12 17:33:29 UTC (rev 2958)
@@ -206,7 +206,8 @@
         self->icon = mb_panel_scaling_image_new( GTK_ORIENTATION_HORIZONTAL, 
NULL );
         mb_panel_scaling_image_set_caching( 
MB_PANEL_SCALING_IMAGE(self->icon), TRUE );
         gtk_container_add( GTK_CONTAINER(self->eventbox), self->icon );
-        gtk_widget_show( self->icon );
+        gtk_event_box_set_visible_window( GTK_EVENT_BOX(self->eventbox), FALSE 
);
+        gtk_widget_show_all( self->eventbox );
     }
     mb_panel_scaling_image_set_icon( MB_PANEL_SCALING_IMAGE(self->icon), 
filename );
 }
@@ -218,7 +219,8 @@
         self->icon = gtk_image_new_from_pixbuf( pixbuf );
         g_return_if_fail( self->icon );
         gtk_container_add( GTK_CONTAINER(self->eventbox), self->icon );
-        gtk_widget_show( self->icon );
+        gtk_event_box_set_visible_window( GTK_EVENT_BOX(self->eventbox), FALSE 
);
+        gtk_widget_show_all( self->eventbox );
     }
     else
         gtk_image_set_from_pixbuf( GTK_IMAGE (self->icon), pixbuf );




--- End Message ---
--- Begin Message ---
Author: abraxa
Date: 2007-09-13 08:48:53 +0200 (Thu, 13 Sep 2007)
New Revision: 2959

Modified:
   
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/src/editor_page.c
   
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/src/files_page.c
   trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/src/guitools.c
   trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/src/guitools.h
   trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/src/main.c
   trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/src/main.h
   trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/src/main_page.c
   
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/src/persistent.c
   
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/src/persistent.h
   trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/src/playback.c
   trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/src/playlist.c
   trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/src/playlist.h
   
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/src/playlist_page.c
Log:
Now informs user when appending a single file to the playlist, too
Auto-creates playlist directory now          
Minor clean-ups/clarifications



Modified: 
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/src/editor_page.c
===================================================================
--- 
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/src/editor_page.c 
    2007-09-12 17:33:29 UTC (rev 2958)
+++ 
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/src/editor_page.c 
    2007-09-13 06:48:53 UTC (rev 2959)
@@ -220,7 +220,7 @@
        GtkTreeViewColumn *column;
        GdkPixbuf *track_icon;
 
-       track_icon = pixbuf_new_from_file("ico-tracktype-generic.png");
+       track_icon = pixbuf_new_from_file("ico-filetype-generic.png");
 
        // Create data model
        omp_editor_page_list_store = gtk_list_store_new(COLUMN_COUNT,
@@ -276,7 +276,7 @@
        main_vbox = gtk_vbox_new(FALSE, 0);
 
        // Caption
-       alignment = label_create(&label, "Sans 6", "black", 0, 0, 0, 0, 0);
+       alignment = label_create(&label, "Sans 6", "black", 0, 0, 0, 0, 
PANGO_ELLIPSIZE_NONE);
        gtk_alignment_set_padding(GTK_ALIGNMENT(alignment), 5, 5, 5, 5);
        gtk_box_pack_start(GTK_BOX(main_vbox), GTK_WIDGET(alignment), FALSE, 
FALSE, 0);
        omp_editor_title_label = label;
@@ -301,7 +301,7 @@
        image = gtk_image_new_from_icon_name("gtk-file", GTK_ICON_SIZE_BUTTON);
        gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(image), TRUE, TRUE, 0);
 
-       alignment = label_create(&label, "Sans 6", "black", 0, 0, 0, 0, 0);
+       alignment = label_create(&label, "Sans 6", "black", 0, 0, 0, 0, 
PANGO_ELLIPSIZE_NONE);
        gtk_label_set_text(GTK_LABEL(label), _("Add Tracks"));
        gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(alignment), TRUE, TRUE, 0);
 

Modified: 
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/src/files_page.c
===================================================================
--- 
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/src/files_page.c  
    2007-09-12 17:33:29 UTC (rev 2958)
+++ 
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/src/files_page.c  
    2007-09-13 06:48:53 UTC (rev 2959)
@@ -92,17 +92,25 @@
 /**
  * Confirms to the user that the files have been added successfully
  * @param track_count Number of tracks that were added
- * @note We only use this when adding directories as it would be annoying 
otherwise
  */
 void
 omp_files_page_success_report(guint track_count)
 {
        GtkWidget *dialog;
 
-       dialog = gtk_message_dialog_new(0,
-               GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_INFO, 
GTK_BUTTONS_OK,
-               _("Successfully added %d files"), track_count);
+       if (!track_count) return;
 
+       if (track_count == 1)
+       {
+               dialog = gtk_message_dialog_new(0,
+                       GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_INFO, 
GTK_BUTTONS_OK,
+                       _("File added successfully"));
+       } else {
+               dialog = gtk_message_dialog_new(0,
+                       GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_INFO, 
GTK_BUTTONS_OK,
+                       _("Successfully added %d files"), track_count);
+       }
+
        // We don't want a title of "<unnamed>"
        gtk_window_set_title(GTK_WINDOW(dialog), " ");
 
@@ -281,7 +289,8 @@
 
                        } else {
 
-                               omp_playlist_track_append_file(entry_name_abs);
+                               if 
(omp_playlist_track_append_file(entry_name_abs))
+                                       omp_files_page_success_report(1);
                        }
 
                        // Save playlist
@@ -459,9 +468,8 @@
 
        g_signal_connect(G_OBJECT(button), "clicked", 
G_CALLBACK(omp_files_page_set_prev_dir), NULL);
 
-       alignment = label_create(&label, "Sans 6", "black", 0, 0, 0, 0, 0);
-       gtk_alignment_set_padding(GTK_ALIGNMENT(alignment), 5, 5, 5, 5);
-       gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(alignment), FALSE, FALSE, 
0);
+       alignment = label_create(&label, "Sans 6", "black", 0.05, 0.5, 1, 0, 
PANGO_ELLIPSIZE_START);
+       gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(alignment), TRUE, TRUE, 0);
        omp_files_path_label = label;
 
        // File list viewport

Modified: 
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/src/guitools.c
===================================================================
--- 
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/src/guitools.c    
    2007-09-12 17:33:29 UTC (rev 2958)
+++ 
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/src/guitools.c    
    2007-09-13 06:48:53 UTC (rev 2959)
@@ -29,7 +29,7 @@
 #include "guitools.h"
 
 /// Absolute path to the UI pixmaps
-gchar *ui_image_path = NULL;
+gchar *omp_ui_image_path = NULL;
 
 
 
@@ -44,7 +44,7 @@
        GdkPixbuf *pixbuf = NULL;
        GError *error = NULL;
 
-       image_file_name = g_strdup_printf("%s/%s", ui_image_path, file_name);
+       image_file_name = g_strdup_printf("%s/%s", omp_ui_image_path, 
file_name);
 
        if(g_file_test(image_file_name, G_FILE_TEST_EXISTS))
        {
@@ -66,16 +66,18 @@
  * Creates a label with default properties, wraps it up in a GtkAlignment and 
returns the latter for direct use
  * @param label Will be filled with a GtkLabel
  * @param font_info The desired font to be used (e.g. "Times 10")
+ * @param color_desc A string containing the name of the desired color (e.g. 
"black")
  * @param xalign Horizontal alignment (0..1)
  * @param yalign Vertical alignment (0..1)
  * @param xscale Horizontal expansion (0..1)
  * @param yscale Vertical expansion (0..1)
+ * @param ellipsize_mode Pango ellipsization mode to set for this label
  * @note See gtk_alignment_new() for further info
  */
 GtkWidget *
 label_create(GtkWidget **label, gchar *font_info, gchar *color_desc,
        gfloat xalign, gfloat yalign, gfloat xscale, gfloat yscale,
-       gint max_char_count)
+       PangoEllipsizeMode ellipsize_mode)
 {
        GdkColor color;
        PangoFontDescription *font_desc;
@@ -88,10 +90,9 @@
        pango_font_description_free(font_desc);
        gtk_misc_set_alignment(GTK_MISC(*label), 0, 0.5);
 
-       if (max_char_count)
+       if (ellipsize_mode != PANGO_ELLIPSIZE_NONE)
        {
-               gtk_label_set_width_chars(GTK_LABEL(*label), max_char_count);
-               gtk_label_set_ellipsize(GTK_LABEL(*label), PANGO_ELLIPSIZE_END);
+               gtk_label_set_ellipsize(GTK_LABEL(*label), ellipsize_mode);
        }
 
        gdk_color_parse(color_desc, &color);
@@ -121,7 +122,7 @@
 
 //     g_object_set(G_OBJECT(*button), "xalign", (gfloat)0.37, "yalign", 
(gfloat)0.37, NULL);
 
-       image_file_name = g_build_path("/", ui_image_path, image_name, NULL);
+       image_file_name = g_build_path("/", omp_ui_image_path, image_name, 
NULL);
        btn_image = gtk_image_new_from_file(image_file_name);
        g_free(image_file_name);
        gtk_container_add(GTK_CONTAINER(button), GTK_WIDGET(btn_image));
@@ -158,7 +159,7 @@
 {
        gchar *image_file_name;
 
-       image_file_name = g_build_path("/", ui_image_path, image_name, NULL);
+       image_file_name = g_build_path("/", omp_ui_image_path, image_name, 
NULL);
        *image = gtk_image_new_from_file(image_file_name);
        g_free(image_file_name);
        gtk_container_add(GTK_CONTAINER(container), GTK_WIDGET(*image));
@@ -202,7 +203,7 @@
        gchar *image_file_name;
        GtkWidget *icon, *alignment;
 
-       image_file_name = g_build_path("/", ui_image_path, image_name, NULL);
+       image_file_name = g_build_path("/", omp_ui_image_path, image_name, 
NULL);
        icon = gtk_image_new_from_file(image_file_name);
        g_free(image_file_name);
 

Modified: 
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/src/guitools.h
===================================================================
--- 
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/src/guitools.h    
    2007-09-12 17:33:29 UTC (rev 2958)
+++ 
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/src/guitools.h    
    2007-09-13 06:48:53 UTC (rev 2959)
@@ -31,12 +31,12 @@
 
 #include "main.h"
 
-extern gchar *ui_image_path;
+extern gchar *omp_ui_image_path;
 
 GdkPixbuf *pixbuf_new_from_file(const gchar* file_name);
 
 GtkWidget *label_create(GtkWidget **label, gchar *font_info, gchar *color_desc,
-       gfloat xalign, gfloat yalign, gfloat xscale, gfloat yscale, gint 
max_char_count);
+       gfloat xalign, gfloat yalign, gfloat xscale, gfloat yscale, 
PangoEllipsizeMode ellipsize_mode);
 GtkWidget *button_create_with_image(gchar *image_name, GtkWidget **image, 
GCallback callback);
 
 void error_dialog(gchar *message);

Modified: 
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/src/main.c
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/src/main.c    
2007-09-12 17:33:29 UTC (rev 2958)
+++ trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/src/main.c    
2007-09-13 06:48:53 UTC (rev 2959)
@@ -390,7 +390,7 @@
 
        // Initialize various things necessary for the full player UI
        moko_stock_register();
-       ui_image_path = g_build_filename(DATA_DIR, RELATIVE_UI_IMAGE_PATH, 
NULL);
+       omp_ui_image_path = g_build_path("/", DATA_DIR, 
OMP_RELATIVE_UI_IMAGE_PATH, NULL);
 
        g_set_application_name(_("Media Player"));
        gtk_window_set_default_icon_name("openmoko-soundandvideo");
@@ -421,7 +421,7 @@
        omp_playback_free();
        omp_playlist_free();
        gst_deinit();
-       g_free(ui_image_path);
+       g_free(omp_ui_image_path);
 
        omp_session_free();
        omp_config_free();

Modified: 
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/src/main.h
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/src/main.h    
2007-09-12 17:33:29 UTC (rev 2958)
+++ trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/src/main.h    
2007-09-13 06:48:53 UTC (rev 2959)
@@ -29,15 +29,6 @@
 
 #include <gtk/gtk.h>
 
-// Where to find application-specific images relative to $DATA_DIR 
(/usr/share/openmoko-mediaplayer)?
-#define RELATIVE_UI_IMAGE_PATH "/images"
-
-// Where to find the playlist files relative to the user's home directory?
-#define RELATIVE_PLAYLIST_PATH "/playlists"
-
-// What file to save/load session data to/from? File name is relative to 
user's home directory
-#define SESSION_FILE_NAME "/.openmoko-mediaplayer"
-
 enum omp_notebook_tabs
 {
        OMP_TAB_MAIN = 0,

Modified: 
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/src/main_page.c
===================================================================
--- 
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/src/main_page.c   
    2007-09-12 17:33:29 UTC (rev 2958)
+++ 
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/src/main_page.c   
    2007-09-13 06:48:53 UTC (rev 2959)
@@ -102,64 +102,6 @@
 }
 
 /**
- * Sets a desired EQ/visualization band to a new level
- * @param pos Band to change (0..11)
- * @param level Level to set (0..15, anything higher gets capped)
- */
-void
-omp_main_band_set(guint pos, guint level)
-{
-       gchar *image_file_name;
-
-       // Sanity checks
-       g_return_if_fail(pos < 12);
-
-       // Pseudo-logarithmize the value
-       guint value = 0;
-
-       switch (level)
-       {
-               case 0:
-               case 1:
-               case 2:
-                       value = 1;
-                       break;
-
-               case 3:
-               case 4:
-                       value = 2;
-                       break;
-
-               case 5:
-               case 6:
-                       value = 3;
-                       break;
-
-               case 7:
-               case 8:
-               case 9:
-               case 10:
-               case 11:
-               case 12:
-               case 13:
-               case 14:
-               case 15:
-                       value = level-3;
-                       break;
-
-               default:
-                       value = 12;
-       }
-
-       // Determine file name of the new image to use and apply it
-       image_file_name = g_strdup_printf("%s/ind-music-eq-%02d.png", 
ui_image_path, value);
-
-       gtk_image_set_from_file(GTK_IMAGE(main_widgets.band_image[pos]), 
image_file_name);
-
-       g_free(image_file_name);
-}
-
-/**
  * Gets called when the time slider's value got changed (yes, that means it 
gets called at least once per second)
  */
 void
@@ -350,12 +292,12 @@
        gtk_container_add(GTK_CONTAINER(destination), GTK_WIDGET(mainvbox));
 
        // Title label
-       alignment = label_create(&main_widgets.title_label, "Sans 8", "black", 
0, 0, 1, 0, 18);
+       alignment = label_create(&main_widgets.title_label, "Sans 8", "black", 
0, 0, 1, 0, PANGO_ELLIPSIZE_END);
        gtk_alignment_set_padding(GTK_ALIGNMENT(alignment), 10, 0, 35, 30);
        gtk_box_pack_start(GTK_BOX(mainvbox), GTK_WIDGET(alignment), TRUE, 
TRUE, 0);
 
        // Artist label
-       alignment = label_create(&main_widgets.artist_label, "Sans 6", "black", 
0, 0, 1, 0, 30);
+       alignment = label_create(&main_widgets.artist_label, "Sans 6", "black", 
0, 0, 1, 0, PANGO_ELLIPSIZE_END);
        gtk_alignment_set_padding(GTK_ALIGNMENT(alignment), 5, 0, 35, 30);
        gtk_box_pack_start(GTK_BOX(mainvbox), GTK_WIDGET(alignment), TRUE, 
TRUE, 0);
 
@@ -376,7 +318,7 @@
        container_add_image(GTK_CONTAINER(alignment), "ico-track.png");
 
        // Track number
-       alignment = label_create(&main_widgets.track_number_label, "Sans 5", 
"black", 0, 0, 0, 0, 0);
+       alignment = label_create(&main_widgets.track_number_label, "Sans 5", 
"black", 0, 0, 0, 0, PANGO_ELLIPSIZE_NONE);
        gtk_box_pack_start(GTK_BOX(upper_hbox), GTK_WIDGET(alignment), TRUE, 
TRUE, 0);
 
        // Time icon
@@ -386,7 +328,7 @@
        container_add_image(GTK_CONTAINER(alignment), "ico-time.png");
 
        // Time
-       alignment = label_create(&main_widgets.time_label, "Sans 5", "black", 
0, 0, 0, 0, 0);
+       alignment = label_create(&main_widgets.time_label, "Sans 5", "black", 
0, 0, 0, 0, PANGO_ELLIPSIZE_NONE);
        gtk_box_pack_start(GTK_BOX(upper_hbox), GTK_WIDGET(alignment), TRUE, 
TRUE, 0);
 
        // --- --- --- --- --- Slider --- --- --- --- ---
@@ -422,7 +364,7 @@
        gtk_container_add(GTK_CONTAINER(alignment), GTK_WIDGET(middle_hbox));
 
        // EQ/Visualization bands
-       image_file_name = g_build_path("/", ui_image_path, 
"ind-music-eq-12.png", NULL);
+       image_file_name = g_build_path("/", omp_ui_image_path, 
"ind-music-eq-12.png", NULL);
 
        for (i=0; i<12; i++)
        {
@@ -450,7 +392,7 @@
        container_add_image_with_ref(GTK_CONTAINER(alignment), 
"ind-music-volume-00.png", &main_widgets.volume_image);
 
        // Volume label
-       alignment = label_create(&main_widgets.volume_label, "Sans 5", 
"darkorange", 0, 0, 1, 0, 0);
+       alignment = label_create(&main_widgets.volume_label, "Sans 5", 
"darkorange", 0, 0, 1, 0, PANGO_ELLIPSIZE_NONE);
        gtk_alignment_set_padding(GTK_ALIGNMENT(alignment), 6, 0, 10, 0);
        gtk_box_pack_start(GTK_BOX(volume_box), GTK_WIDGET(alignment), TRUE, 
TRUE, 0);
        caption = g_strdup_printf(OMP_WIDGET_CAPTION_VOLUME, 0);
@@ -724,9 +666,9 @@
 
        if (state)
        {
-               image_file_name = g_build_filename(ui_image_path, 
"ico-shuffle-on.png", NULL);
+               image_file_name = g_build_filename(omp_ui_image_path, 
"ico-shuffle-on.png", NULL);
        } else {
-               image_file_name = g_build_filename(ui_image_path, 
"ico-shuffle-off.png", NULL);
+               image_file_name = g_build_filename(omp_ui_image_path, 
"ico-shuffle-off.png", NULL);
        }
 
        gtk_image_set_from_file(GTK_IMAGE(main_widgets.shuffle_button_image), 
image_file_name);
@@ -744,19 +686,19 @@
        switch (mode)
        {
                case OMP_REPEAT_OFF:
-                       image_file_name = g_build_filename(ui_image_path, 
"ico-repeat-off.png", NULL);
+                       image_file_name = g_build_filename(omp_ui_image_path, 
"ico-repeat-off.png", NULL);
                        break;
 
                case OMP_REPEAT_ONCE:
-                       image_file_name = g_build_filename(ui_image_path, 
"ico-repeat-once.png", NULL);
+                       image_file_name = g_build_filename(omp_ui_image_path, 
"ico-repeat-once.png", NULL);
                        break;
 
                case OMP_REPEAT_CURRENT:
-                       image_file_name = g_build_filename(ui_image_path, 
"ico-repeat-current.png", NULL);
+                       image_file_name = g_build_filename(omp_ui_image_path, 
"ico-repeat-current.png", NULL);
                        break;
 
                case OMP_REPEAT_ALL:
-                       image_file_name = g_build_filename(ui_image_path, 
"ico-repeat-all.png", NULL);
+                       image_file_name = g_build_filename(omp_ui_image_path, 
"ico-repeat-all.png", NULL);
        }
 
        gtk_image_set_from_file(GTK_IMAGE(main_widgets.repeat_button_image), 
image_file_name);
@@ -833,7 +775,7 @@
 
        volume = omp_playback_get_volume();
 
-       image_file_name = g_strdup_printf("%s/ind-music-volume-%02d.png", 
ui_image_path, volume/10);
+       image_file_name = g_strdup_printf("%s/ind-music-volume-%02d.png", 
omp_ui_image_path, volume/10);
        gtk_image_set_from_file(GTK_IMAGE(main_widgets.volume_image), 
image_file_name);
        g_free(image_file_name);
 

Modified: 
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/src/persistent.c
===================================================================
--- 
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/src/persistent.c  
    2007-09-12 17:33:29 UTC (rev 2958)
+++ 
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/src/persistent.c  
    2007-09-13 06:48:53 UTC (rev 2959)
@@ -25,6 +25,7 @@
  */
 
 #include <glib.h>
+#include <glib/gstdio.h>
 
 #include <string.h>
 #include <stdlib.h>
@@ -180,11 +181,18 @@
 void
 omp_session_init()
 {
+       gchar *path_name;
+
        // This mustn't be called more than once
        g_return_if_fail(omp_session == NULL);
 
        omp_session = g_new0(struct _omp_session, 1);
        omp_session_reset();
+
+       // Make sure the playlist directory exists
+       path_name = g_build_path("/", g_get_home_dir(), 
OMP_RELATIVE_PLAYLIST_PATH, NULL);
+       g_mkdir(path_name, S_IRUSR | S_IWUSR | S_IXUSR);  // rwx for the user, 
nothing for anyone else
+       g_free(path_name);
 }
 
 /**
@@ -254,8 +262,8 @@
 
        g_return_if_fail(omp_session);
 
-       // SESSION_FILE_NAME is relative to user's home dir
-       file_name = g_build_filename(g_get_home_dir(), SESSION_FILE_NAME, NULL);
+       // OMP_SESSION_FILE_NAME is relative to user's home dir
+       file_name = g_build_filename(g_get_home_dir(), OMP_SESSION_FILE_NAME, 
NULL);
 
        // Permissions for created session file are 0600
        session_file = creat(file_name, S_IRUSR | S_IWUSR);
@@ -290,8 +298,8 @@
 
        g_return_if_fail(omp_session);
 
-       // SESSION_FILE_NAME is relative to user's home dir
-       file_name = g_build_filename(g_get_home_dir(), SESSION_FILE_NAME, NULL);
+       // OMP_SESSION_FILE_NAME is relative to user's home dir
+       file_name = g_build_filename(g_get_home_dir(), OMP_SESSION_FILE_NAME, 
NULL);
 
        session_file = open(file_name, O_RDONLY);
        if (session_file == -1) goto io_error;

Modified: 
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/src/persistent.h
===================================================================
--- 
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/src/persistent.h  
    2007-09-12 17:33:29 UTC (rev 2958)
+++ 
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/src/persistent.h  
    2007-09-13 06:48:53 UTC (rev 2959)
@@ -35,8 +35,20 @@
 
 #define OMP_EVENT_SESSION_FILE_CHOOSER_PATH_CHANGED 
"session_file_chooser_path_changed"
 
+// Default path to open in the file chooser
 #define OMP_DEFAULT_FILE_CHOOSER_PATH "/media/card/"
 
+// What file to save/load session data to/from? File name is relative to 
user's home directory
+#define OMP_SESSION_FILE_NAME "/.openmoko-mediaplayer"
+
+// Where to find application-specific images relative to $DATA_DIR 
(/usr/share/openmoko-mediaplayer)?
+#define OMP_RELATIVE_UI_IMAGE_PATH "/images"
+
+// Where to find the playlist files relative to the user's home directory?
+#define OMP_RELATIVE_PLAYLIST_PATH "/playlists"
+
+
+
 /// Application configuration data
 /// @note Default values are taken from omp_default_config
 /// @note Update that struct as well if you make changes here!

Modified: 
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/src/playback.c
===================================================================
--- 
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/src/playback.c    
    2007-09-12 17:33:29 UTC (rev 2958)
+++ 
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/src/playback.c    
    2007-09-13 06:48:53 UTC (rev 2959)
@@ -320,7 +320,7 @@
 omp_playback_get_track_position()
 {
        GstFormat format = GST_FORMAT_TIME;
-       gint64 position;
+       gint64 position = 0;
 
        if (!omp_gst_playbin)
        {
@@ -341,10 +341,7 @@
        GstState pipe_state;
        gint64 pos;
 
-       if (!omp_gst_playbin)
-       {
-               return;
-       }
+       if (!omp_gst_playbin) return;
 
        // If we don't clamp it to values >= 0 we trigger EOS messages which 
make the playlist mess up
        if (position < 0) position = 0;

Modified: 
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/src/playlist.c
===================================================================
--- 
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/src/playlist.c    
    2007-09-12 17:33:29 UTC (rev 2958)
+++ 
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/src/playlist.c    
    2007-09-13 06:48:53 UTC (rev 2959)
@@ -905,9 +905,10 @@
 
 /**
  * Appends a track to the end of the playlist
+ * @return TRUE on success, FALSE on failure
  * @todo Make unicode-safe
  */
-void
+gboolean
 omp_playlist_track_append_file(gchar *file_name)
 {
        omp_spiff_track *new_track;
@@ -915,8 +916,8 @@
        gchar *uri, name_char;
        guint name_pos, uri_pos, name_len;
 
-       if (!omp_playlist) return;
-       if (!file_name) return;
+       if (!omp_playlist) return FALSE;
+       if (!file_name) return FALSE;
 
        // Try to make the "last track" pointer valid - if it stays NULL then 
the list is empty
        if (!omp_playlist_last_track)
@@ -927,9 +928,13 @@
        // Append track
        if (omp_playlist_last_track)
        {
+               // List already has entries - we append
                new_track = 
omp_spiff_new_track_before(&omp_playlist_last_track->next);
                omp_playlist_last_track = omp_playlist_last_track->next;
+
        } else {
+
+               // List is empty - we start it
                new_track = omp_spiff_new_track_before(&omp_playlist->tracks);
                omp_playlist_last_track = omp_playlist->tracks;
        }
@@ -976,6 +981,8 @@
 
        // Notify UI of the change
        g_signal_emit_by_name(G_OBJECT(omp_window), 
OMP_EVENT_PLAYLIST_TRACK_COUNT_CHANGED);
+
+       return TRUE;
 }
 
 /**

Modified: 
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/src/playlist.h
===================================================================
--- 
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/src/playlist.h    
    2007-09-12 17:33:29 UTC (rev 2958)
+++ 
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/src/playlist.h    
    2007-09-13 06:48:53 UTC (rev 2959)
@@ -92,7 +92,7 @@
 void omp_playlist_advance_iter(omp_playlist_iter *iter);
 gboolean omp_playlist_iter_finished(omp_playlist_iter *iter);
 
-void omp_playlist_track_append_file(gchar *file_name);
+gboolean omp_playlist_track_append_file(gchar *file_name);
 guint omp_playlist_track_append_directory(gchar *dir_name);
 
 gchar *get_base_file_name(gchar *file_name);

Modified: 
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/src/playlist_page.c
===================================================================
--- 
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/src/playlist_page.c
   2007-09-12 17:33:29 UTC (rev 2958)
+++ 
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/src/playlist_page.c
   2007-09-13 06:48:53 UTC (rev 2959)
@@ -34,6 +34,7 @@
 
 #include "guitools.h"
 #include "main.h"
+#include "persistent.h"
 #include "playlist.h"
 #include "playlist_page.h"
 
@@ -161,7 +162,7 @@
                FILE_NAME_COLUMN, &playlist_file, -1);
 
        playlist_file_abs =
-               g_build_filename(g_get_home_dir(), RELATIVE_PLAYLIST_PATH, 
playlist_file, NULL);
+               g_build_filename(g_get_home_dir(), OMP_RELATIVE_PLAYLIST_PATH, 
playlist_file, NULL);
 
        // Determine what to do
        switch (column_id)
@@ -200,7 +201,7 @@
        g_return_if_fail(name[0] != 0);
 
        // Playlist path is relative to user's home dir
-       path = g_build_path("/", g_get_home_dir(), RELATIVE_PLAYLIST_PATH, 
NULL);
+       path = g_build_path("/", g_get_home_dir(), OMP_RELATIVE_PLAYLIST_PATH, 
NULL);
        file_name = g_strdup_printf("%s/%s.%s", path, name, 
OMP_PLAYLIST_FILE_EXTENSION);
 
        omp_playlist_create(file_name);
@@ -225,7 +226,7 @@
        gtk_list_store_clear(omp_playlist_page_list_store);
 
        // Playlist path is relative to user's home dir
-       path = g_build_path("/", g_get_home_dir(), RELATIVE_PLAYLIST_PATH, 
NULL);
+       path = g_build_path("/", g_get_home_dir(), OMP_RELATIVE_PLAYLIST_PATH, 
NULL);
 
        playlist_dir = g_dir_open(path, 0, &error);
 
@@ -325,7 +326,7 @@
        main_vbox = gtk_vbox_new(FALSE, 0);
 
        // Caption #1
-       alignment = label_create(&label, "Sans 6", "black", 0, 0, 0, 0, 0);
+       alignment = label_create(&label, "Sans 6", "black", 0, 0, 0, 0, 
PANGO_ELLIPSIZE_NONE);
        gtk_alignment_set_padding(GTK_ALIGNMENT(alignment), 5, 5, 5, 5);
        gtk_box_pack_start(GTK_BOX(main_vbox), GTK_WIDGET(alignment), FALSE, 
FALSE, 0);
        gtk_label_set_text(GTK_LABEL(label), _("Select Playlist to load:"));
@@ -338,7 +339,7 @@
        omp_playlist_page_list_create(GTK_CONTAINER(scroll_box));
 
        // Caption #2
-       alignment = label_create(&label, "Sans 6", "black", 0, 0, 0, 0, 0);
+       alignment = label_create(&label, "Sans 6", "black", 0, 0, 0, 0, 
PANGO_ELLIPSIZE_NONE);
        gtk_alignment_set_padding(GTK_ALIGNMENT(alignment), 5, 5, 5, 5);
        gtk_box_pack_start(GTK_BOX(main_vbox), GTK_WIDGET(alignment), FALSE, 
FALSE, 0);
        gtk_label_set_text(GTK_LABEL(label), _("Enter name to create a new 
playlist:"));
@@ -348,7 +349,7 @@
        omp_playlist_page_entry = gtk_entry_new();
        button = gtk_button_new();
 
-       image_file_name = g_build_filename(ui_image_path, 
"ico-playlist-new.png", NULL);
+       image_file_name = g_build_filename(omp_ui_image_path, 
"ico-playlist-new.png", NULL);
        image = gtk_image_new_from_file(image_file_name);
        g_free(image_file_name);
        gtk_container_add(GTK_CONTAINER(button), GTK_WIDGET(image));




--- End Message ---
_______________________________________________
commitlog mailing list
[email protected]
http://lists.openmoko.org/mailman/listinfo/commitlog

Reply via email to