Active Topics

 



Notices


Reply
Thread Tools
Posts: 376 | Thanked: 511 times | Joined on Aug 2009 @ Greece
#111
Originally Posted by Schturman View Post
F*ck... Thanks man !
I did this but without permission, I forgot about permission Now it's work, but...
In this post you wrote we need add the words "start" and "stop".. Where I should write this words in the script ?
Have a look at this wiki entry.
 

The Following 2 Users Say Thank You to v13 For This Useful Post:
Schturman's Avatar
Posts: 5,339 | Thanked: 4,133 times | Joined on Jan 2010 @ Israel
#112
 
Schturman's Avatar
Posts: 5,339 | Thanked: 4,133 times | Joined on Jan 2010 @ Israel
#113
Hello
I have another little problem...
I noticed when I switch from default profile to my custom, it does not load completely. it's not load my QBW widgets and I always need reload my profile. After reloading all is fine... Why this happens ? And can you fix this ?
Thanks

Last edited by Schturman; 2011-01-25 at 20:54.
 

The Following User Says Thank You to Schturman For This Useful Post:
Posts: 376 | Thanked: 511 times | Joined on Aug 2009 @ Greece
#114
Originally Posted by Schturman View Post
Hello
I have another little problem...
I noticed when I switch from default profile to my custom, it does not load completely. it's not load my QBW widgets and I always need reload my profile. After reloading all is fine... Why this happens ? And can you fix this ?
Thanks
I've seen this too and it's in my bug list to fix.

Thanks for testing!
 

The Following User Says Thank You to v13 For This Useful Post:
Posts: 502 | Thanked: 366 times | Joined on Jun 2010 @ /dev/null
#115
I don't know if this is the right place to post patches. I have been working on an ugly hack to allow both 9 desktops and desktop activity manager to work together and I've come up with a somewhat working patch.

I've been meaning to post this but have gotten lazy. I have also tried to make a new switch inside the activity file for loading the previously saved profile should the currently edited profile does not work. However the switch does not work :| I'm trying to make it so that it ignores the previous and current profiles are the same one and to prevent one using load command which actually saves the currently modified profile before switching.

The hack requires one to have a directory multi_backgrounds setup along with a directory inside that one containing the actual activity name. For example, if you have an activity name called Default, you must have a directory inside multi_backgrounds under /home/user as Default and so the full path is: /home/user/multi_backgrounds/Default.

There are some bugs with the hack, notably when one has more than 4 desktops the gconftool will show desktop backgrounds beyond 4 to be previous activity's backgrounds. I have tried various ways to alleviate that issue without much success as you can see from the excessive commented lines and therefore redundant commands.

Here is the contents of the patch:
Code:
--- activity.old	2010-04-14 10:07:23.000000000 +1000
+++ activity	2011-01-23 11:12:23.000000000 +1000
@@ -241,8 +241,122 @@
 	echo -n "."
 
 	gconftool-2 --load $SRCDIR/views.dump
+	
+	echo -n "."
+	# hack test for modified desktop
+	rm -f /home/user/.backgrounds/*
+	cp /home/user/multi_backgrounds/$1/*.png /home/user/.backgrounds/
+	cp /home/user/multi_backgrounds/$1/cache.info /home/user/.backgrounds/
+	gconftool -s /apps/osso/hildon-desktop/views/active -t list --list-type int [1,2,3,4,5,6,7,8,9]
+	for i in 1 2 3 4 5 6 7 8 9
+	# do gconftool -s /apps/osso/hildon-desktop/views/$i/bg-image -t string /home/user/multi_backgrounds/$1/background-$i.png
+	do gconftool -s /apps/osso/hildon-desktop/views/$1/bg-image -t string /home/user/.backgrounds/background-$i.png
+	gconftool -s /apps/osso/hildon-desktop/views/active -t list --list-type int [1,2,3,4,5,6,7,8,9]
+	done
+	set_current $1
+
+	echo
+}
+
+qload()
+{
+	
+	if [ -z "$1" ] ; then
+		cat << _KOKO
+Pass the new activity as the first argument.
+_KOKO
+		exit 1
+	fi
+
+	if [ "x$1" = "x-f" ] ; then
+		ACT="$2"
+	else
+		ACT="$1"
+	fi
+
+	echo "Switching to activity: $ACT"
+
+	restore2 "$ACT"
+
+	empty
+
+	restart_hildonhome
+
+	SRCDIR="$DSTDIR0/$1"
+
+	if is_empty "$1" ; then
+		echo "Empty desktop"
+		set_current $1
+		return
+	fi
+
+	echo -n "Restoring "
+
+	# First load the views - this will be repeated at the end
+
+	gconftool-2 --load $SRCDIR/views.dump
 
 	echo -n "."
+
+	T="$SRCDIR/home-thumbnails.tar.gz"
+	if [ -e $T ] ; then
+		[ -d "$THUMBNAILS" ] || mkdir "$THUMBNAILS"
+
+		tar -zxf $SRCDIR/home-thumbnails.tar.gz -C $THUMBNAILS
+	fi
+
+	echo -n "."
+
+	gconftool-2 --load $SRCDIR/bookmarks.dump
+
+	echo -n "."
+
+	gconftool-2 --load $SRCDIR/applets.dump
+
+	sleep 3
+	echo -n "."
+
+	#cp $SRCDIR/home.plugins "$HOME/.config/hildon-desktop/home.plugins"
+	if [ -e "$SRCDIR/home.plugins" ] ; then
+		cp $SRCDIR/home.plugins "$HOMEPLUGINS"
+	else
+		rm -f $SRCDIR/home.plugins
+	fi
+
+	sleep 2
+
+	echo -n "."
+
+	gconftool-2 -s --type list --list-type string \
+		"$HHBASE/bookmark-shortcuts" \
+		"$(cat $SRCDIR/bookmark-shortcuts)"
+
+	echo -n "."
+	gconftool-2 -s --type list --list-type string \
+		"$HHBASE/task-shortcuts" \
+		"$(cat $SRCDIR/task-shortcuts)"
+	echo -n "."
+	gconftool-2 -s --type list --list-type string \
+		"$CONTACTS" \
+		"$(cat $SRCDIR/contacts)"
+	sleep 1
+
+	echo -n "."
+
+	gconftool-2 --load $SRCDIR/applets.dump
+
+	echo -n "."
+
+	gconftool-2 --load $SRCDIR/views.dump
+	
+	echo -n "."
+	# hack test for modified desktop
+	rm -f /home/user/.backgrounds/*
+	gconftool -s /apps/osso/hildon-desktop/views/active -t list --list-type int [1,2,3,4,5,6,7,8,9]
+	for i in 1 2 3 4 5 6 7 8 9
+	do gconftool -s /apps/osso/hildon-desktop/views/$i/bg-image -t string /home/user/multi_backgrounds/$1/background-$i.png
+	gconftool -s /apps/osso/hildon-desktop/views/active -t list --list-type int [1,2,3,4,5,6,7,8,9]
+	done
 	set_current $1
 
 	echo
@@ -500,9 +614,13 @@
 		# Just load
 		do_load "$2" "$3"
 		;;
+	qload)
+		# Just load
+		qload "$2" "$3"
+		;;
 	change)
-		# Save the current and load the next
-		do_change "$2"
+	# Save the current and load the next
+	do_change "$2"
 		;;
 	list)
 		do_list
The attached txt file is the patch file, you will need to rename it to .patch before applying the patch.

N.B.: This is an experimental patch, I do *not* condone the use of patch if you do not want undesired effects on your device. The patch was meant to be for the developer or the keen hackers in mind. USE THIS PATCH AT YOUR OWN RISK!

Last edited by tuxsavvy; 2011-07-04 at 09:14.
 

The Following User Says Thank You to tuxsavvy For This Useful Post:
Posts: 270 | Thanked: 37 times | Joined on Sep 2010
#116
I hope the developer implement this patch in a new release because I have 5 desktop and I have always a problem with the 5 desktop...
thank you very much
 
Posts: 56 | Thanked: 21 times | Joined on Feb 2011 @ Bangalore, India
#117
First of all, a really wonderful app. A small doubt, the wiki for actman shows a "More" button. Its not there in the 0.9-1 version. Is the wiki written according to the devel version?
Another doubt, does this store the DCEW widgets also? I see that sometimes when restoring the activity, DCEW widgets are not restored.
 
Posts: 539 | Thanked: 165 times | Joined on Feb 2010 @ Berlin, Germany
#118
Originally Posted by shrijith1 View Post
the wiki for actman shows a "More" button. Its not there in the 0.9-1 version. Is the wiki written according to the devel version?
Yes. It's in the 1.x version of actman which currently is in extras-devel. Entering 'more' offers the ability to reload or to store the current activity without switching.

Another doubt, does this store the DCEW widgets also? I see that sometimes when restoring the activity, DCEW widgets are not restored.
I had no problems with saving and restoring DCEW widgets. Are they getting saved correctly?
 

The Following User Says Thank You to x-lette For This Useful Post:
Posts: 502 | Thanked: 366 times | Joined on Jun 2010 @ /dev/null
#119
I've updated the script (from extras-devel) to:
- Include qload functionality (quick load, only for developers as you may lose shortcuts on your hildon-home.)
- Fixed up some typos (not really important if anything
- Decorated list when the user runs activity script from terminal, the command now is activity clist rather than activity list as that is what the GUI uses.
- Makes sure the user is not root when trying to list the activities in command line.
- Improper command will no longer say Bad command:, instead it will now print the help menu.
- Bumped the minor version to 1.1.1

Code:
--- /usr/bin/activity.orig	2011-05-29 17:10:04.000000000 +1000
+++ /usr/bin/activity	2011-07-03 16:25:09.000000000 +1000
@@ -20,7 +20,7 @@
 #
 # $Id: 0.py 2265 2010-02-21 19:16:26Z v13 $
 
-VERSION="1.1"
+VERSION="1.1.1"
 
 D0="$HOME/.activities"
 
@@ -312,7 +312,7 @@
 		cat << _KOKO
 Pass the activity name to save the current configuration to.
 The "current" activity will be also set to be that activity.
-If it doesn't exist it will be created.
+If it does not exist it will be created.
 _KOKO
 		exit 1
 	fi
@@ -333,7 +333,7 @@
 {
 	if [ -z "$1" ] ; then
 		cat << _KOKO
-Pass the new activity as the first argument. If it doesn't exist it will
+Pass the new activity as the first argument. If it does not exist it will
 be created.
 _KOKO
 		exit 1
@@ -356,7 +356,35 @@
 
 do_list()
 {
+if [ "$(whoami)" = 'root' ]; then
+        echo "You should not run this as root."
+        exit 1;
+fi
+	(
+	FOUND=0
+	cd $DSTDIR0
+	for i in * ; do
+		if [ -d "$i" ] ; then
+			echo "$i"
+			FOUND=1
+		fi
+	done
+	# If there is no activity, return the default as if it existed
+	if [ "$FOUND" = "0" ] ; then
+		echo "$DEFAULTACTIVITY"
+	fi
+	)
+}
+
+do_clist()
+{
+if [ "$(whoami)" = 'root' ]; then
+        echo "You should not run this as root."
+        exit 1;
+fi
 	(
+	echo "List of stored activities:"
+	echo "========================================================="
 	FOUND=0
 	cd $DSTDIR0
 	for i in * ; do
@@ -365,6 +393,8 @@
 			FOUND=1
 		fi
 	done
+	echo "========================================================="
+	echo "Current activity: `cat $D0/$DSTDIR0/current`"
 	# If there is no activity, return the default as if it existed
 	if [ "$FOUND" = "0" ] ; then
 		echo "$DEFAULTACTIVITY"
@@ -434,13 +464,13 @@
 	if [ -z "$1" ] || [ -z "$2" ] ; then
 		cat << _KOKO
 Pass the source and destination name as first and second parameter
-repsectively.
+respectively.
 _KOKO
 		exit 1
 	fi
 
 	if ! check_exist "$1" ; then
-		echo "Activity $1 doesn't exist"
+		echo "Activity $1 does not exist"
 		exit 1
 	fi
 
@@ -490,7 +520,7 @@
 	check_exist_error "$ACT"
 
 	if ! [ "x$1" = "x-f" ] ; then
-		read -p "Are you sure? (type yes to continue) " ans
+		read -p "Are you sure? (type "yes" to continue) " ans
 		if ! [ "$ans" = "yes" ] ; then
 			echo "Aborted"
 			return
@@ -525,6 +555,27 @@
 	restore2 "$CURRENT"
 }
 
+do_qload()
+{
+	if [ -z "$1" ] ; then
+		cat << _KOKO
+Pass the new activity as the first argument.
+_KOKO
+		exit 1
+	fi
+	if [ "x$1" = "x-f" ] ; then
+		ACT="$2"
+	else
+		ACT="$1"
+	fi
+	
+	check_exist_error "$1"
+
+	echo "Loading "$1" activity without saving changes"
+	
+	restore2 "$ACT"
+}
+
 do_runstart()
 {
 	if [ "x$1" = "x" ] ; then
@@ -562,10 +613,12 @@
   create ACTIVITY	Create a new (empty) activity.
   current		Print the current activity name.
   delete [-f] ACTIVITY	Same as remove.
-  help			This help.
-  list			List available activities.
+  help			This help screen.
+  clist			List available activities.
   load [-f] SRC		Load activity SRC. If -f is used then it will be
   			allowed to re-load the current activity.
+  qload	SRC		Quickly loads the activity without saving any
+			changes to the previous activity. (devs only)
   new ACTIVITY		Same as create.
   reload		Reload current activity without storing first.
   remove [-f] ACTIVITY	Remove activity ACTIVITY. If -f is used then there
@@ -593,6 +646,9 @@
 		# Just load
 		do_load "$2" "$3"
 		;;
+	qload)
+		do_qload "$2" "$3"
+		;;
 	change)
 		# Save the current and load the next
 		do_change "$2"
@@ -600,6 +656,9 @@
 	list)
 		do_list
 		;;
+	clist)
+		do_clist
+		;;
 	current)
 		do_current
 		;;
@@ -631,7 +690,7 @@
 		do_version
 		;;
 	*)
-		echo "Bad command: $1"
+		do_help
 		;;
 esac
Any of you whom have used my previous patch on actman needs to realise that there's several flaws with the patch I've made, such as the fact that it littered the views.dump file along with gconf with extra bg-images. For starters the extra entries needs to be deleted and that needs to be applied for every affected desktop activity.

I will not condone the use of my previous patch (like I have already mentioned) nor will I condone the use of this one. The 9 desktop already works well without having to implement any extra lines to the code to make it work.
 

The Following User Says Thank You to tuxsavvy For This Useful Post:
Posts: 669 | Thanked: 433 times | Joined on May 2010
#120
Support for the new CSSU's portrait mode will be great - currently does not remember the portrait mode settings.
 
Reply


 
Forum Jump


All times are GMT. The time now is 04:07.