[maemo-commits] [maemo-commits] r17340 - in projects/haf/trunk/hildon-initscripts: . debian

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Mon Feb 2 13:08:27 EET 2009
Author: schulhof
Date: 2009-02-02 13:08:18 +0200 (Mon, 02 Feb 2009)
New Revision: 17340

Modified:
   projects/haf/trunk/hildon-initscripts/configure.ac
   projects/haf/trunk/hildon-initscripts/debian/changelog
   projects/haf/trunk/hildon-initscripts/debian/control
   projects/haf/trunk/hildon-initscripts/osso-gtk.defs
Log:
Gut osso-gtk.defs and rely on theme-config >= 0.7 to ensure theme validity.

Modified: projects/haf/trunk/hildon-initscripts/configure.ac
===================================================================
--- projects/haf/trunk/hildon-initscripts/configure.ac	2009-01-31 14:39:42 UTC (rev 17339)
+++ projects/haf/trunk/hildon-initscripts/configure.ac	2009-02-02 11:08:18 UTC (rev 17340)
@@ -1,4 +1,4 @@
-AC_INIT([hildon-initscripts], [1.20])
+AC_INIT([hildon-initscripts], [1.21])
 AC_CONFIG_SRCDIR([run-standalone.sh])
 
 AM_INIT_AUTOMAKE

Modified: projects/haf/trunk/hildon-initscripts/debian/changelog
===================================================================
--- projects/haf/trunk/hildon-initscripts/debian/changelog	2009-01-31 14:39:42 UTC (rev 17339)
+++ projects/haf/trunk/hildon-initscripts/debian/changelog	2009-02-02 11:08:18 UTC (rev 17340)
@@ -1,3 +1,11 @@
+hildon-initscripts (1.21-1) unstable; urgency=low
+
+  * Completely gutted osso-gtk.defs. We now rely on theme-config >= 0.7 to ensure
+    that the theme is valid.
+  * Fixes: NB#99238
+
+ -- Gabriel Schulhof <gabriel.schulhof at nokia.com>  Mon,  2 Feb 2009 12:58:58 +0200
+
 hildon-initscripts (1.20-1) unstable; urgency=low
 
   * Do not do anything about $HOME if it's a root process

Modified: projects/haf/trunk/hildon-initscripts/debian/control
===================================================================
--- projects/haf/trunk/hildon-initscripts/debian/control	2009-01-31 14:39:42 UTC (rev 17339)
+++ projects/haf/trunk/hildon-initscripts/debian/control	2009-02-02 11:08:18 UTC (rev 17340)
@@ -8,7 +8,7 @@
 Package: hildon-initscripts
 Section: base
 Architecture: all
-Depends: gtk2-engines-sapwood, dbus, osso-af-startup
+Depends: gtk2-engines-sapwood, dbus, osso-af-startup, theme-config (>= 0.7)
 Conflicts: hildon-base
 Replaces: hildon-base
 Description: Miscellaneous startup files.

Modified: projects/haf/trunk/hildon-initscripts/osso-gtk.defs
===================================================================
--- projects/haf/trunk/hildon-initscripts/osso-gtk.defs	2009-01-31 14:39:42 UTC (rev 17339)
+++ projects/haf/trunk/hildon-initscripts/osso-gtk.defs	2009-02-02 11:08:18 UTC (rev 17340)
@@ -1,93 +1,4 @@
 #!/bin/sh
 # osso-gtk.defs - Gtk, Pango, IM definitions for all applications 
 # using Gtk in AF.
-
-validate_theme() # $1 = theme name
-{
-  THEMES_DIR=/usr/share/themes
-  if test -d ${THEMES_DIR}/$1; then
-    if test -f ${THEMES_DIR}/$1/gtk-2.0/gtkrc; then
-      if test -f ${THEMES_DIR}/$1/gtk-2.0/gtkrc.maemo_af_desktop; then
-        if test -f ${THEMES_DIR}/$1/matchbox/theme.xml; then
-          return 0
-        fi
-      fi
-    fi
-  fi
-  return 1
-}
-
-if [ "x$USER" = "xroot" ]; then
-  # do not create files or directories as root
-  DONOTCREATE=1
-fi
-
-PREFIX=/usr
-SYSCONFDIR=/etc
-ORIGHOME=$HOME
-if test "x$USER" = "x"; then
-  HOME=/home/user  ;# needed for some root processes
-elif test $(id -u) -ne 0; then
-  HOME=/home/$USER
-fi
-
-if [ $(id -u) -eq 0 ]; then
-  export XDG_DATA_HOME=$PREFIX/share/mime
-fi
-
-DEFAULTMBTHEME=default
-DEFAULTGTKTHEME=default
-
-if [ -e /targets/links/scratchbox.config ]; then
-  # Scratchbox hack
-  TMP=`whoami`
-  HOME="/home/$TMP"
-fi
-
-CURRENT_THEME_DIR=$HOME/.osso
-CURRENT_THEME_FILE=$CURRENT_THEME_DIR/current-gtk-theme
-CURRENT_KEY_THEME_FILE=$CURRENT_THEME_DIR/current-gtk-key-theme
-
-if [ ! -f $CURRENT_THEME_FILE -a "x$DONOTCREATE" = "x" ]; then
-
-  mkdir -p $CURRENT_THEME_DIR
-  cp -f /etc/osso-af-init/current-gtk-theme.default $CURRENT_THEME_FILE
-
-else
-
-  # investigate if theme exists
-  THEMEFILE=$(cat $CURRENT_THEME_FILE | sed -e "s/include\ \"\/usr\/share\/themes\///" -e 's/\/gtk\-2\.0\/gtkrc\"//'|tr -d '\n')
-  DEFAULTMBTHEME=$THEMEFILE
-
-  # if theme directory does not exist, use 'default' theme
-  if ! validate_theme $THEMEFILE; then
-
-    if [ "x$DONOTCREATE" = "x" ]; then
-      # set GTK theme
-      cp -f /etc/osso-af-init/current-gtk-theme.default $CURRENT_THEME_FILE
-
-      # set MAD theme
-      echo "include \"$PREFIX/share/themes/default/gtk-2.0/gtkrc.maemo_af_desktop\"" \
-        > $CURRENT_THEME_DIR/current-gtk-theme.maemo_af_desktop
-    fi
-
-    # set MBOX theme
-    DEFAULTMBTHEME=default
-  fi
-fi
-
-if [ ! -f $CURRENT_KEY_THEME_FILE -a "x$DONOTCREATE" = "x" ]; then
-  cp -f /etc/osso-af-init/current-gtk-key-theme.default $CURRENT_KEY_THEME_FILE
-fi
-
-# have to do these for the case that this was sourced
-HOME=$ORIGHOME
-unset ORIGHOME
-unset PREFIX
-unset SYSCONFDIR
-unset DONOTCREATE
-
-export DEFAULTMBTHEME=$DEFAULTMBTHEME
-export DEFAULTGTKTHEME=$DEFAULTGTKTHEME
-
-export GTK2_RC_FILES=$CURRENT_THEME_FILE:$CURRENT_KEY_THEME_FILE
+export GTK2_RC_FILES=/usr/share/themes/default/gtk-2.0/gtkrc


More information about the maemo-commits mailing list