[Debian-hebrew-package] [svn] r556 - pkg/user-he/trunk/scripts

Yaacov Zamir kzamir-guest at alioth.debian.org
Tue Apr 24 15:55:10 UTC 2007


Author: kzamir-guest
Date: Tue Apr 24 15:55:10 2007
New Revision: 556

Modified:
   pkg/user-he/trunk/scripts/hebrew-settings
Log:
gnome-panel > 2.18.1 in unstabel has auto direction change for LTR langauges. fix user-he pkg's hebrew-settings script for this

Modified: pkg/user-he/trunk/scripts/hebrew-settings
==============================================================================
--- pkg/user-he/trunk/scripts/hebrew-settings	(original)
+++ pkg/user-he/trunk/scripts/hebrew-settings	Tue Apr 24 15:55:10 2007
@@ -212,11 +212,30 @@
 	gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults \
 		--type boolean --set /apps/panel/default_setup/applets/kbd/use_menu_path false
 
+	# Check if gnome-panel has auto direction change for LTR languages.
+	# ver. 2.18.1 and above align the panel to the right for LTR languages automatically
+	# for versions below 2.18.x use manual settings
+	gnome_panel_has_auto_dir=0
+
+	if [ -x /usr/bin/gnome-panel ]; then
+		big_v=`gnome-panel --version | cut -d' ' -f3 | cut -d. -f1` 
+		sub_v=`gnome-panel --version | cut -d' ' -f3 | cut -d. -f2` 
+	
+		if (( $big_v > 2 )); then
+			gnome_panel_has_auto_dir=1
+		fi
+		
+		if (( (( $big_v == 2 )) && (( $sub_v >= 18 )) )); then
+			gnome_panel_has_auto_dir=1
+		fi
+	fi
 
 	# On a Hebrew desktop set panel to rtl view
 	# If enabled flag is on make sure desktop is set for english !
 	# FIXME: this only work if the user did not set up his desktop, and he use the defaults.
-	if [[ $enabled == 1 ]]; then
+	# FIXME II: remove the manual direction settings of gnome-panel when all debian versions will use
+	#           gnome-panel >= 2.18.x
+	if [[ $enabled == 1 || $gnome_panel_has_auto_dir == 1 ]]; then
 		# this is for latin interface 
 		# we _need_ this to set an enabled system after hebrew install
 		gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.defaults \



More information about the Debian-hebrew-package mailing list