2007-04-23 Wang Xin <
[email protected]>
* SUNWgnome-applets.spec: Enable battstat by default on laptop.
In post section:
1. load the gconf entries in panel-default-setup-laptop.entries
into gconf database.
2. insert battstat into two lists:
/apps/panel/default_setup/general/applet_id_list_jds
/apps/panel/profiles/default/general/applet_id_list_jds
In preun section:
1. unload the loaded gconf entries.
2. remove battstat from those two lists.
* patches/gnome-applets--05-battstat.diff: Add new gconf schema to
make the applet enabled by default on laptop.
--- a/ChangeLog Sun Apr 22 12:37:51 2007 +0000
+++ b/ChangeLog Mon Apr 23 03:29:44 2007 +0000
@@ -1,3 +1,18 @@
+2007-04-23 Wang Xin <[email protected]>
+
+ * SUNWgnome-applets.spec: Enable battstat by default on laptop.
+ In post section:
+ 1. load the gconf entries in panel-default-setup-laptop.entries
+ into gconf database.
+ 2. insert battstat into two lists:
+ /apps/panel/default_setup/general/applet_id_list_jds
+ /apps/panel/profiles/default/general/applet_id_list_jds
+ In preun section:
+ 1. unload the loaded gconf entries.
+ 2. remove battstat from those two lists.
+ * patches/gnome-applets--05-battstat.diff: Add new gconf schema to
+ make the applet enabled by default on laptop.
+
2007-04-22 Jim Li <[email protected]>
* patches/libgksu1.2-04-rbac-support.diff: Bug fixes #6517484.
--- a/SUNWgnome-applets.spec Sun Apr 22 12:37:51 2007 +0000
+++ b/SUNWgnome-applets.spec Mon Apr 23 03:29:44 2007 +0000
@@ -415,7 +415,19 @@
echo 'umask 0022';
echo 'GCONF_CONFIG_SOURCE=xml:merged:/etc/gconf/gconf.xml.defaults';
echo 'export GCONF_CONFIG_SOURCE';
+ echo 'JDS_LIST1=/apps/panel/default_setup/general/applet_id_list_jds';
+ echo 'JDS_LIST2=/apps/panel/profiles/default/general/applet_id_list_jds';
echo '/usr/bin/gconftool-2 --makefile-install-rule %{_sysconfdir}/gconf/schemas/*.schemas'
+ echo 'test -c /devices/pseudo/battery@0:battery0 && {';
+ echo ' /usr/bin/gconftool-2 --direct --config-source=$GCONF_CONFIG_SOURCE --load %{_sysconfdir}/gconf/schemas/panel-default-setup-laptop.entries';
+ echo ' /usr/bin/gconftool-2 --direct --config-source=$GCONF_CONFIG_SOURCE --load %{_sysconfdir}/gconf/schemas/panel-default-setup-laptop.entries /apps/panel/profiles/default';
+ echo ' APPLETS=`gconftool-2 --direct --config-source=$GCONF_CONFIG_SOURCE --owner=panel --get $JDS_LIST1 | sed -n "s/\(\[.*\)\]/\1,battstat]/p"`'
+ echo ' gconftool-2 --direct --config-source=$GCONF_CONFIG_SOURCE --owner=panel --unset $JDS_LIST1'
+ echo ' gconftool-2 --direct --config-source=$GCONF_CONFIG_SOURCE --owner=panel --type=list --list-type=string --set $JDS_LIST1 $APPLETS'
+ echo ' APPLETS=`gconftool-2 --direct --config-source=$GCONF_CONFIG_SOURCE --owner=panel --get $JDS_LIST2 | sed -n "s/\(\[.*\)\]/\1,battstat]/p"`'
+ echo ' gconftool-2 --direct --config-source=$GCONF_CONFIG_SOURCE --owner=panel --unset $JDS_LIST2'
+ echo ' gconftool-2 --direct --config-source=$GCONF_CONFIG_SOURCE --owner=panel --type=list --list-type=string --set $JDS_LIST2 $APPLETS'
+ echo '}';
) | $BASEDIR/var/lib/postrun/postrun -u -c JDS_wait
%preun -n SUNWgnome-utility-applets-root
@@ -427,15 +439,28 @@
echo 'umask 0022';
echo 'GCONF_CONFIG_SOURCE=xml:merged:$BASEDIR/etc/gconf/gconf.xml.defaults';
echo 'GCONF_BACKEND_DIR=$PKG_INSTALL_ROOT/usr/lib/GConf/2';
+ echo 'JDS_LIST1=/apps/panel/default_setup/general/applet_id_list_jds';
+ echo 'JDS_LIST2=/apps/panel/profiles/default/general/applet_id_list_jds';
echo 'LD_LIBRARY_PATH=$PKG_INSTALL_ROOT/usr/lib';
echo 'export GCONF_CONFIG_SOURCE GCONF_BACKEND_DIR LD_LIBRARY_PATH';
echo 'SDIR=$BASEDIR%{_sysconfdir}/gconf/schemas';
echo 'schemas="$SDIR/charpick.schemas';
+ echo ' $SDIR/battstat.schemas';
echo ' $SDIR/deskbar-applet.schemas';
echo ' $SDIR/quick-lounge.schemas';
echo ' $SDIR/multiload.schemas';
echo ' $SDIR/stickynotes.schemas"';
echo '$PKG_INSTALL_ROOT/usr/bin/gconftool-2 --makefile-uninstall-rule $schemas'
+ echo 'test -c /devices/pseudo/battery@0:battery0 && {';
+ echo ' $PKG_INSTALL_ROOT/usr/bin/gconftool-2 --direct --config-source=$GCONF_CONFIG_SOURCE --unload $SDIR/panel-default-setup-laptop.entries';
+ echo ' $PKG_INSTALL_ROOT/usr/bin/gconftool-2 --direct --config-source=$GCONF_CONFIG_SOURCE --unload $SDIR/panel-default-setup-laptop.entries /apps/panel/profiles/default';
+ echo ' APPLETS=`gconftool-2 --direct --config-source=$GCONF_CONFIG_SOURCE --owner=panel --get $JDS_LIST1 | sed -n "s/\(\[.*\),battstat\(\]\)/\1\\2/p"`';
+ echo ' gconftool-2 --direct --config-source=$GCONF_CONFIG_SOURCE --owner=panel --unset $JDS_LIST1'
+ echo ' gconftool-2 --direct --config-source=$GCONF_CONFIG_SOURCE --owner=panel --type=list --list-type=string --set $JDS_LIST1 $APPLETS'
+ echo ' APPLETS=`gconftool-2 --direct --config-source=$GCONF_CONFIG_SOURCE --owner=panel --get $JDS_LIST2 | sed -n "s/\(\[.*\),battstat\(\]\)/\1\\2/p"`';
+ echo ' gconftool-2 --direct --config-source=$GCONF_CONFIG_SOURCE --owner=panel --unset $JDS_LIST2'
+ echo ' gconftool-2 --direct --config-source=$GCONF_CONFIG_SOURCE --owner=panel --type=list --list-type=string --set $JDS_LIST2 $APPLETS'
+ echo '}';
) | $BASEDIR/var/lib/postrun/postrun -i -c JDS -a
%files
@@ -653,6 +678,7 @@
%{_sysconfdir}/gconf/schemas/deskbar-applet.schemas
%{_sysconfdir}/gconf/schemas/multiload.schemas
%{_sysconfdir}/gconf/schemas/battstat.schemas
+%{_sysconfdir}/gconf/schemas/panel-default-setup-laptop.entries
%{_sysconfdir}/sound/events/battstat_applet.soundlist
%files -n SUNWgnome-utility-applets-devel
--- a/patches/gnome-applets-05-battstat.diff Sun Apr 22 12:37:51 2007 +0000
+++ b/patches/gnome-applets-05-battstat.diff Mon Apr 23 03:29:44 2007 +0000
@@ -86,3 +86,96 @@
*)
echo "warning: ${host} is not supported by battstat_applet, not building" >&2
build_battstat_applet=no
+diff -u -r gnome-applets-2.18.0/battstat/Makefile.am gnome-applets-2.18.0-new/battstat/Makefile.am
+--- gnome-applets-2.18.0/battstat/Makefile.am 2006-12-31 10:14:45.000000000 +0800
++++ gnome-applets-2.18.0-new/battstat/Makefile.am 2007-04-18 14:49:49.771187000 +0800
+@@ -57,6 +57,9 @@
+ $(HAL_LIBS) \
+ $(APMLIB)
+
++entriesdir = $(GCONF_SCHEMA_FILE_DIR)
++entries_DATA = panel-default-setup-laptop.entries
++
+ schemasdir = @GCONF_SCHEMA_FILE_DIR@
+ schemas_in_files = battstat.schemas.in
+ schemas_DATA = $(schemas_in_files:.schemas.in=.schemas)
+@@ -84,6 +87,7 @@
+ $(glade_DATA) \
+ $(ui_DATA) \
+ GNOME_BattstatApplet.server.in.in \
++ $(entries_DATA) \
+ $(schemas_in_files)
+
+
+diff -u -r gnome-applets-2.18.0/battstat/panel-default-setup-laptop.entries gnome-applets-2.18.0-new/battstat/panel-default-setup-laptop.entries
+--- gnome-applets-2.18.0/battstat/panel-default-setup-laptop.entries 2007-04-18 14:42:01.388868000 +0800
++++ gnome-applets-2.18.0-new/battstat/panel-default-setup-laptop.entries 2007-04-19 12:11:17.980555000 +0800
+@@ -0,0 +1,68 @@
++<!--
++ This file is loaded in %post only on laptops. It adds information for a
++ battery meter applet.
++-->
++
++<gconfentryfile>
++ <!-- Battery status applet -->
++
++ <entrylist base="/apps/panel/default_setup">
++
++ <entry>
++ <key>applets/battstat/object_type</key>
++ <schema_key>/schemas/apps/panel/objects/object_type</schema_key>
++ <value>
++ <string>bonobo-applet</string>
++ </value>
++ </entry>
++ <entry>
++ <key>applets/battstat/toplevel_id</key>
++ <schema_key>/schemas/apps/panel/objects/toplevel_id</schema_key>
++ <value>
++ <string>bottom_panel</string>
++ </value>
++ </entry>
++ <entry>
++ <key>applets/battstat/position</key>
++ <schema_key>/schemas/apps/panel/objects/position</schema_key>
++ <value>
++ <int>4</int>
++ </value>
++ </entry>
++ <entry>
++ <key>applets/battstat/panel_right_stick</key>
++ <schema_key>/schemas/apps/panel/objects/panel_right_stick</schema_key>
++ <value>
++ <bool>true</bool>
++ </value>
++ </entry>
++ <entry>
++ <key>applets/battstat/locked</key>
++ <schema_key>/schemas/apps/panel/objects/locked</schema_key>
++ <value>
++ <bool>true</bool>
++ </value>
++ </entry>
++ <entry>
++ <key>applets/battstat/bonobo_iid</key>
++ <schema_key>/schemas/apps/panel/objects/bonobo_iid</schema_key>
++ <value>
++ <string>OAFIID:GNOME_BattstatApplet</string>
++ </value>
++ </entry>
++
++ <entry><key>applets/battstat/attached_toplevel_id</key><schema_key>/schemas/apps/panel/objects/attached_toplevel_id</schema_key> </entry>
++ <entry><key>applets/battstat/tooltip</key><schema_key>/schemas/apps/panel/objects/tooltip</schema_key></entry>
++ <entry><key>applets/battstat/use_custom_icon</key><schema_key>/schemas/apps/panel/objects/use_custom_icon</schema_key></entry>
++ <entry><key>applets/battstat/custom_icon</key><schema_key>/schemas/apps/panel/objects/custom_icon</schema_key></entry>
++ <entry><key>applets/battstat/use_menu_path</key><schema_key>/schemas/apps/panel/objects/use_menu_path</schema_key></entry>
++ <entry><key>applets/battstat/menu_path</key><schema_key>/schemas/apps/panel/objects/menu_path</schema_key></entry>
++ <entry><key>applets/battstat/launcher_location</key><schema_key>/schemas/apps/panel/objects/launcher_location</schema_key></entry>
++ <entry><key>applets/battstat/action_type</key><schema_key>/schemas/apps/panel/objects/action_type</schema_key></entry>
++ <entry><key>applets/battstat/text</key><schema_key>/schemas/apps/panel/objects/text</schema_key></entry>
++ <entry><key>applets/battstat/text_font</key><schema_key>/schemas/apps/panel/objects/text_font</schema_key></entry>
++ <entry><key>applets/battstat/boundary_box</key><schema_key>/schemas/apps/panel/objects/boundary_box</schema_key></entry>
++
++ </entrylist>
++
++</gconfentryfile>