[maemo-commits] [maemo-commits] r19228 - in projects/haf/trunk/osso-af-utils: debian src

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Fri Aug 28 14:10:56 EEST 2009
Author: schulhof
Date: 2009-08-28 14:10:55 +0300 (Fri, 28 Aug 2009)
New Revision: 19228

Modified:
   projects/haf/trunk/osso-af-utils/debian/changelog
   projects/haf/trunk/osso-af-utils/src/fb-progress.c
   projects/haf/trunk/osso-af-utils/src/fb-progress.sh
Log:
Sync from projects

Modified: projects/haf/trunk/osso-af-utils/debian/changelog
===================================================================
--- projects/haf/trunk/osso-af-utils/debian/changelog	2009-08-28 10:54:09 UTC (rev 19227)
+++ projects/haf/trunk/osso-af-utils/debian/changelog	2009-08-28 11:10:55 UTC (rev 19228)
@@ -1,3 +1,18 @@
+osso-af-utils (2.10-1) unstable; urgency=low
+
+  * Use dot animation (indicator_update_white icons), handle transparency.
+    Fixes: NB#127978 - No progress indicator is visible below the Nokia logo
+
+ -- Viktor Nagy <vik at garage.maemo.org>  Thu, 16 Jul 2009 17:23:55 +0200
+
+osso-af-utils (2.9-1) unstable; urgency=low
+
+  * Wait until /proc and /tmp is mounted, check boot state instead of
+    boot reason.
+    Fixes: NB#123050 - Osso-af-utils tries to open file which does not exit
+
+ -- Viktor Nagy <vik at garage.maemo.org>  Tue, 30 Jun 2009 10:52:57 +0200
+
 osso-af-utils (2.8-1) unstable; urgency=low
 
   * Install cursors into /usr/share/icons/default

Modified: projects/haf/trunk/osso-af-utils/src/fb-progress.c
===================================================================
--- projects/haf/trunk/osso-af-utils/src/fb-progress.c	2009-08-28 10:54:09 UTC (rev 19227)
+++ projects/haf/trunk/osso-af-utils/src/fb-progress.c	2009-08-28 11:10:55 UTC (rev 19228)
@@ -839,10 +839,6 @@
 	image.wd = wd;
 	image.ht = ht;
 	
-	/* alpha channel not supported. At least not yet... */
-	if (color_type & PNG_COLOR_MASK_ALPHA)
-		png_set_strip_alpha(png_ptr);
-	
 	/* transfer image to RGB if not already */
 	if (color_type != PNG_COLOR_TYPE_RGB)
 		png_set_expand(png_ptr); 
@@ -851,6 +847,14 @@
 	if (bit_depth == 16) 
 		png_set_strip_16(png_ptr);
 
+        png_color_16 bgcolor = { 0 };
+        bgcolor.red = (Options.bg_color & 0xff0000) >> 16;
+        bgcolor.green = (Options.bg_color & 0x00ff00) >> 8;
+        bgcolor.blue = (Options.bg_color & 0x0000ff);
+        // composite the image against the background color
+        png_set_background(png_ptr, &bgcolor, PNG_BACKGROUND_GAMMA_SCREEN, 
+                           0, 1.0);
+
 	png_read_update_info(png_ptr, info_ptr);
 	png_uint_32 rowbytes = png_get_rowbytes(png_ptr, info_ptr);
 	
@@ -888,7 +892,7 @@
 	      
 	int k=0;
 	for (j = 0; j < image.ht; j++) {
-		uint8_t *picture = row_pointers[j];
+            uint8_t *picture = row_pointers[j];
 		for (i = 0; i < image.wd; i++) {
       if (2 == depth)
   			*(uint16_t *)(image.pixel_buffer + k) = 

Modified: projects/haf/trunk/osso-af-utils/src/fb-progress.sh
===================================================================
--- projects/haf/trunk/osso-af-utils/src/fb-progress.sh	2009-08-28 10:54:09 UTC (rev 19227)
+++ projects/haf/trunk/osso-af-utils/src/fb-progress.sh	2009-08-28 11:10:55 UTC (rev 19228)
@@ -16,27 +16,31 @@
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 # 02110-1301 USA
 
-AF_PIDDIR=/tmp/af-piddir
-if [ ! -d $AF_PIDDIR ]; then
-	# note, no write to flash involved here
-	mkdir $AF_PIDDIR
-	# I'm not the only one writing here
-	chmod 777 $AF_PIDDIR
-fi
 PIDFILE=$AF_PIDDIR/fb-progress.pid
 LOGO_IMGDIR=/usr/share/icons/hicolor/scalable/hildon
 LOGO=startup_nokia_logo.png
-BAR_IMGDIR=/usr/share/icons/hicolor/48x48/hildon
+BAR_IMGDIR=/usr/share/icons/hicolor/scalable/hildon
 BAR=indicator_update_white
 
 SECS=9
 
 case "$1" in
 start)	
+        # wait until we have /proc and /dev
+        while [ ! -f /proc/bootreason -o ! -e /dev/tty0  ]; do
+            sleep 1;
+        done
 	# don't show progress bar if device started to ACTDEAD first
-        BOOTREASON=`cat /proc/bootreason`
-        if [ "x$BOOTREASON" != "xcharger" \
+        BOOTSTATE=`getbootstate 2>/dev/null`
+        if [ "$BOOTSTATE" != "ACT_DEAD" \
 	     -a ! -f /tmp/skip-fb-progress.tmp ]; then
+                AF_PIDDIR=/tmp/af-piddir
+                if [ ! -d $AF_PIDDIR ]; then
+                    # note, no write to flash involved here
+                    mkdir $AF_PIDDIR
+                    # I'm not the only one writing here
+                    chmod 777 $AF_PIDDIR
+                fi
         	echo "Starting: fb-progress"
         	fb-progress -l $LOGO_IMGDIR/$LOGO -g $BAR_IMGDIR/$BAR $SECS > /dev/null 2>&1 &
         	echo "$!" > $PIDFILE

More information about the maemo-commits mailing list