Hello community,
here is the log from the commit of package yast2 for openSUSE:Factory
checked in at Wed Sep 21 17:30:13 CEST 2011.
--------
--- yast2/yast2.changes 2011-09-20 00:58:52.000000000 +0200
+++ /mounts/work_src_done/STABLE/yast2/yast2.changes 2011-09-19 11:16:36.000000000 +0200
@@ -1,0 +2,10 @@
+Fri Sep 16 11:46:38 CEST 2011 - visnov@suse.de
+
+- Added UIHelper library module - contains useful
+ UI helpers from now obsolete Wizard_hw
+- Drop Wizard_hw
+- Added Wizard::SetDesktopTitleAndIcon
+- Added Desktop::ParseSingleDesktopFile
+- 2.21.22
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
yast2-2.21.21.tar.bz2
New:
----
yast2-2.21.22.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2.spec ++++++
--- /var/tmp/diff_new_pack.CnzMpR/_old 2011-09-21 17:30:08.000000000 +0200
+++ /var/tmp/diff_new_pack.CnzMpR/_new 2011-09-21 17:30:08.000000000 +0200
@@ -19,11 +19,11 @@
Name: yast2
-Version: 2.21.21
+Version: 2.21.22
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-2.21.21.tar.bz2
+Source0: yast2-2.21.22.tar.bz2
Prefix: /usr
@@ -129,7 +129,7 @@
installation with YaST2.
%prep
-%setup -n yast2-2.21.21
+%setup -n yast2-2.21.22
%build
%{prefix}/bin/y2tool y2autoconf
++++++ yast2-2.21.21.tar.bz2 -> yast2-2.21.22.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-2.21.21/VERSION new/yast2-2.21.22/VERSION
--- old/yast2-2.21.21/VERSION 2011-09-15 16:26:42.000000000 +0200
+++ new/yast2-2.21.22/VERSION 2011-09-19 08:52:50.000000000 +0200
@@ -1 +1 @@
-2.21.21
+2.21.22
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-2.21.21/configure new/yast2-2.21.22/configure
--- old/yast2-2.21.21/configure 2011-09-15 16:26:48.000000000 +0200
+++ new/yast2-2.21.22/configure 2011-09-19 13:01:22.000000000 +0200
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for yast2 2.21.21.
+# Generated by GNU Autoconf 2.68 for yast2 2.21.22.
#
# Report bugs to http://bugs.opensuse.org/.
#
@@ -559,8 +559,8 @@
# Identity of this package.
PACKAGE_NAME='yast2'
PACKAGE_TARNAME='yast2'
-PACKAGE_VERSION='2.21.21'
-PACKAGE_STRING='yast2 2.21.21'
+PACKAGE_VERSION='2.21.22'
+PACKAGE_STRING='yast2 2.21.22'
PACKAGE_BUGREPORT='http://bugs.opensuse.org/'
PACKAGE_URL=''
@@ -1232,7 +1232,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures yast2 2.21.21 to adapt to many kinds of systems.
+\`configure' configures yast2 2.21.22 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1303,7 +1303,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of yast2 2.21.21:";;
+ short | recursive ) echo "Configuration of yast2 2.21.22:";;
esac
cat <<\_ACEOF
@@ -1383,7 +1383,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-yast2 configure 2.21.21
+yast2 configure 2.21.22
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1400,7 +1400,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by yast2 $as_me 2.21.21, which was
+It was created by yast2 $as_me 2.21.22, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2330,7 +2330,7 @@
# Define the identity of the package.
PACKAGE='yast2'
- VERSION='2.21.21'
+ VERSION='2.21.22'
cat >>confdefs.h <<_ACEOF
@@ -2452,7 +2452,7 @@
-VERSION="2.21.21"
+VERSION="2.21.22"
RPMNAME="yast2"
MAINTAINER="Jiri Srain "
@@ -2933,7 +2933,7 @@
# also done via makefile
ac_config_files="$ac_config_files library/modules/Version.ycp library/network/agents/network.scr"
-ac_config_files="$ac_config_files Makefile data/Makefile doc/autodocs/Makefile doc/examples/Makefile doc/screenshots/Makefile doc/Makefile library/agents/Makefile library/types/src/Makefile library/types/testsuite/Makefile library/types/doc/autodocs/Makefile library/types/doc/Makefile library/types/Makefile library/modules/testsuite/Makefile library/modules/Makefile library/runlevel/doc/autodocs/Makefile library/runlevel/doc/Makefile library/runlevel/src/Makefile library/runlevel/testsuite/Makefile library/runlevel/Makefile library/sequencer/doc/autodocs/Makefile library/sequencer/doc/images/Makefile library/sequencer/doc/examples/Makefile library/sequencer/doc/Makefile library/sequencer/src/Makefile library/sequencer/testsuite/Makefile library/sequencer/Makefile library/xml/doc/autodocs/Makefile library/xml/doc/Makefile library/xml/src/Makefile library/xml/Makefile library/commandline/agents/Makefile library/commandline/doc/autodocs/Makefile library/commandline/doc/Makefile library/commandline/src/Makefile library/commandline/testsuite/Makefile library/commandline/Makefile library/wizard/doc/autodocs/Makefile library/wizard/doc/examples/Makefile library/wizard/doc/screenshots/Makefile library/wizard/doc/Makefile library/wizard/src/Makefile library/wizard/testsuite/Makefile library/wizard/Makefile library/control/doc/autodocs/Makefile library/control/doc/Makefile library/control/src/Makefile library/control/testsuite/Makefile library/control/Makefile library/cwm/doc/autodocs/Makefile library/cwm/doc/Makefile library/cwm/src/Makefile library/cwm/testsuite/Makefile library/cwm/Makefile library/log/doc/autodocs/Makefile library/log/doc/Makefile library/log/src/Makefile library/log/Makefile library/system/agents/Makefile library/system/doc/autodocs/Makefile library/system/doc/Makefile library/system/src/Makefile library/system/testsuite/Makefile library/system/Makefile library/packages/src/Makefile library/packages/testsuite/Makefile library/packages/doc/autodocs/Makefile library/packages/doc/Makefile library/packages/Makefile library/cron/src/Makefile library/cron/doc/autodocs/Makefile library/cron/doc/Makefile library/cron/Makefile library/desktop/doc/autodocs/Makefile library/desktop/doc/Makefile library/desktop/groups/Makefile library/desktop/src/Makefile library/desktop/Makefile library/network/agents/Makefile library/network/doc/autodocs/Makefile library/network/doc/Makefile library/network/src/Makefile library/network/testsuite/Makefile library/network/Makefile library/gpg/doc/autodocs/Makefile library/gpg/doc/Makefile library/gpg/src/Makefile library/gpg/testsuite/Makefile library/gpg/Makefile library/Makefile remote/Makefile scripts/Makefile"
+ac_config_files="$ac_config_files Makefile data/Makefile doc/autodocs/Makefile doc/examples/Makefile doc/screenshots/Makefile doc/Makefile library/agents/Makefile library/types/src/Makefile library/types/testsuite/Makefile library/types/doc/autodocs/Makefile library/types/doc/Makefile library/types/Makefile library/modules/testsuite/Makefile library/modules/Makefile library/runlevel/doc/autodocs/Makefile library/runlevel/doc/Makefile library/runlevel/src/Makefile library/runlevel/testsuite/Makefile library/runlevel/Makefile library/sequencer/doc/autodocs/Makefile library/sequencer/doc/images/Makefile library/sequencer/doc/examples/Makefile library/sequencer/doc/Makefile library/sequencer/src/Makefile library/sequencer/testsuite/Makefile library/sequencer/Makefile library/xml/doc/autodocs/Makefile library/xml/doc/Makefile library/xml/src/Makefile library/xml/Makefile library/commandline/agents/Makefile library/commandline/doc/autodocs/Makefile library/commandline/doc/Makefile library/commandline/src/Makefile library/commandline/testsuite/Makefile library/commandline/Makefile library/desktop/doc/autodocs/Makefile library/desktop/doc/Makefile library/desktop/groups/Makefile library/desktop/src/Makefile library/desktop/Makefile library/wizard/doc/autodocs/Makefile library/wizard/doc/examples/Makefile library/wizard/doc/screenshots/Makefile library/wizard/doc/Makefile library/wizard/src/Makefile library/wizard/testsuite/Makefile library/wizard/Makefile library/control/doc/autodocs/Makefile library/control/doc/Makefile library/control/src/Makefile library/control/testsuite/Makefile library/control/Makefile library/cwm/doc/autodocs/Makefile library/cwm/doc/Makefile library/cwm/src/Makefile library/cwm/testsuite/Makefile library/cwm/Makefile library/log/doc/autodocs/Makefile library/log/doc/Makefile library/log/src/Makefile library/log/Makefile library/system/agents/Makefile library/system/doc/autodocs/Makefile library/system/doc/Makefile library/system/src/Makefile library/system/testsuite/Makefile library/system/Makefile library/packages/src/Makefile library/packages/testsuite/Makefile library/packages/doc/autodocs/Makefile library/packages/doc/Makefile library/packages/Makefile library/cron/src/Makefile library/cron/doc/autodocs/Makefile library/cron/doc/Makefile library/cron/Makefile library/network/agents/Makefile library/network/doc/autodocs/Makefile library/network/doc/Makefile library/network/src/Makefile library/network/testsuite/Makefile library/network/Makefile library/gpg/doc/autodocs/Makefile library/gpg/doc/Makefile library/gpg/src/Makefile library/gpg/testsuite/Makefile library/gpg/Makefile library/Makefile remote/Makefile scripts/Makefile"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
@@ -3498,7 +3498,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by yast2 $as_me 2.21.21, which was
+This file was extended by yast2 $as_me 2.21.22, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -3551,7 +3551,7 @@
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-yast2 config.status 2.21.21
+yast2 config.status 2.21.22
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
@@ -3702,6 +3702,11 @@
"library/commandline/src/Makefile") CONFIG_FILES="$CONFIG_FILES library/commandline/src/Makefile" ;;
"library/commandline/testsuite/Makefile") CONFIG_FILES="$CONFIG_FILES library/commandline/testsuite/Makefile" ;;
"library/commandline/Makefile") CONFIG_FILES="$CONFIG_FILES library/commandline/Makefile" ;;
+ "library/desktop/doc/autodocs/Makefile") CONFIG_FILES="$CONFIG_FILES library/desktop/doc/autodocs/Makefile" ;;
+ "library/desktop/doc/Makefile") CONFIG_FILES="$CONFIG_FILES library/desktop/doc/Makefile" ;;
+ "library/desktop/groups/Makefile") CONFIG_FILES="$CONFIG_FILES library/desktop/groups/Makefile" ;;
+ "library/desktop/src/Makefile") CONFIG_FILES="$CONFIG_FILES library/desktop/src/Makefile" ;;
+ "library/desktop/Makefile") CONFIG_FILES="$CONFIG_FILES library/desktop/Makefile" ;;
"library/wizard/doc/autodocs/Makefile") CONFIG_FILES="$CONFIG_FILES library/wizard/doc/autodocs/Makefile" ;;
"library/wizard/doc/examples/Makefile") CONFIG_FILES="$CONFIG_FILES library/wizard/doc/examples/Makefile" ;;
"library/wizard/doc/screenshots/Makefile") CONFIG_FILES="$CONFIG_FILES library/wizard/doc/screenshots/Makefile" ;;
@@ -3738,11 +3743,6 @@
"library/cron/doc/autodocs/Makefile") CONFIG_FILES="$CONFIG_FILES library/cron/doc/autodocs/Makefile" ;;
"library/cron/doc/Makefile") CONFIG_FILES="$CONFIG_FILES library/cron/doc/Makefile" ;;
"library/cron/Makefile") CONFIG_FILES="$CONFIG_FILES library/cron/Makefile" ;;
- "library/desktop/doc/autodocs/Makefile") CONFIG_FILES="$CONFIG_FILES library/desktop/doc/autodocs/Makefile" ;;
- "library/desktop/doc/Makefile") CONFIG_FILES="$CONFIG_FILES library/desktop/doc/Makefile" ;;
- "library/desktop/groups/Makefile") CONFIG_FILES="$CONFIG_FILES library/desktop/groups/Makefile" ;;
- "library/desktop/src/Makefile") CONFIG_FILES="$CONFIG_FILES library/desktop/src/Makefile" ;;
- "library/desktop/Makefile") CONFIG_FILES="$CONFIG_FILES library/desktop/Makefile" ;;
"library/network/agents/Makefile") CONFIG_FILES="$CONFIG_FILES library/network/agents/Makefile" ;;
"library/network/doc/autodocs/Makefile") CONFIG_FILES="$CONFIG_FILES library/network/doc/autodocs/Makefile" ;;
"library/network/doc/Makefile") CONFIG_FILES="$CONFIG_FILES library/network/doc/Makefile" ;;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-2.21.21/configure.in new/yast2-2.21.22/configure.in
--- old/yast2-2.21.21/configure.in 2011-09-15 16:26:44.000000000 +0200
+++ new/yast2-2.21.22/configure.in 2011-09-19 13:01:19.000000000 +0200
@@ -1,9 +1,9 @@
dnl configure.in for yast2
dnl
-dnl -- This file is generated by y2autoconf 2.18.11 - DO NOT EDIT! --
+dnl -- This file is generated by y2autoconf 2.21.0 - DO NOT EDIT! --
dnl (edit configure.in.in instead)
-AC_INIT(yast2, 2.21.21, http://bugs.opensuse.org/, yast2)
+AC_INIT(yast2, 2.21.22, http://bugs.opensuse.org/, yast2)
dnl Check for presence of file 'RPMNAME'
AC_CONFIG_SRCDIR([RPMNAME])
@@ -18,7 +18,7 @@
AM_INIT_AUTOMAKE(tar-ustar -Wno-portability)
dnl Important YaST2 variables
-VERSION="2.21.21"
+VERSION="2.21.22"
RPMNAME="yast2"
MAINTAINER="Jiri Srain "
@@ -220,6 +220,11 @@
library/commandline/src/Makefile
library/commandline/testsuite/Makefile
library/commandline/Makefile
+library/desktop/doc/autodocs/Makefile
+library/desktop/doc/Makefile
+library/desktop/groups/Makefile
+library/desktop/src/Makefile
+library/desktop/Makefile
library/wizard/doc/autodocs/Makefile
library/wizard/doc/examples/Makefile
library/wizard/doc/screenshots/Makefile
@@ -256,11 +261,6 @@
library/cron/doc/autodocs/Makefile
library/cron/doc/Makefile
library/cron/Makefile
-library/desktop/doc/autodocs/Makefile
-library/desktop/doc/Makefile
-library/desktop/groups/Makefile
-library/desktop/src/Makefile
-library/desktop/Makefile
library/network/agents/Makefile
library/network/doc/autodocs/Makefile
library/network/doc/Makefile
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-2.21.21/library/Makefile.am new/yast2-2.21.22/library/Makefile.am
--- old/yast2-2.21.21/library/Makefile.am 2011-09-15 16:26:41.000000000 +0200
+++ new/yast2-2.21.22/library/Makefile.am 2011-09-19 13:01:01.000000000 +0200
@@ -1,3 +1,3 @@
# Makefile.am for yast2/library
-SUBDIRS = agents types modules runlevel sequencer xml commandline wizard control cwm log system packages cron desktop network gpg
+SUBDIRS = agents types modules runlevel sequencer xml commandline desktop wizard control cwm log system packages cron network gpg
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-2.21.21/library/Makefile.in new/yast2-2.21.22/library/Makefile.in
--- old/yast2-2.21.21/library/Makefile.in 2011-09-15 16:26:49.000000000 +0200
+++ new/yast2-2.21.22/library/Makefile.in 2011-09-19 13:01:22.000000000 +0200
@@ -208,7 +208,7 @@
ydatadir = @ydatadir@
yncludedir = @yncludedir@
ystartupdir = @ystartupdir@
-SUBDIRS = agents types modules runlevel sequencer xml commandline wizard control cwm log system packages cron desktop network gpg
+SUBDIRS = agents types modules runlevel sequencer xml commandline desktop wizard control cwm log system packages cron network gpg
all: all-recursive
.SUFFIXES:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-2.21.21/library/control/src/Makefile.am new/yast2-2.21.22/library/control/src/Makefile.am
--- old/yast2-2.21.21/library/control/src/Makefile.am 2011-09-15 16:26:36.000000000 +0200
+++ new/yast2-2.21.22/library/control/src/Makefile.am 2011-09-19 13:07:12.000000000 +0200
@@ -8,6 +8,6 @@
EXTRA_DIST = $(module_DATA)
-YCPCFLAGS = -M ../../modules -M ../../xml/src -M ../../wizard/src -M ../../types/src
+YCPCFLAGS = -M ../../modules -M ../../xml/src -M ../../wizard/src -M ../../types/src -M ../../desktop/src
include $(top_srcdir)/Makefile.am.common
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-2.21.21/library/control/src/Makefile.in new/yast2-2.21.22/library/control/src/Makefile.in
--- old/yast2-2.21.21/library/control/src/Makefile.in 2011-09-15 16:26:50.000000000 +0200
+++ new/yast2-2.21.22/library/control/src/Makefile.in 2011-09-19 13:07:18.000000000 +0200
@@ -201,7 +201,7 @@
productdir = ${sysconfdir}/YaST2
module_DATA = $(wildcard *.ycp)
EXTRA_DIST = $(module_DATA)
-YCPCFLAGS = -M ../../modules -M ../../xml/src -M ../../wizard/src -M ../../types/src
+YCPCFLAGS = -M ../../modules -M ../../xml/src -M ../../wizard/src -M ../../types/src -M ../../desktop/src
modulebin_DATA = $(patsubst %.ycp,%.ybc,$(module_DATA))
modulebindir = $(moduledir)
ybcfiles = $(filter %.ybc,$(modulebin_DATA))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-2.21.21/library/cwm/src/Makefile.am new/yast2-2.21.22/library/cwm/src/Makefile.am
--- old/yast2-2.21.21/library/cwm/src/Makefile.am 2011-09-15 16:26:39.000000000 +0200
+++ new/yast2-2.21.22/library/cwm/src/Makefile.am 2011-09-19 13:08:08.000000000 +0200
@@ -1,6 +1,6 @@
# Makefile.am yast2/library/cwm/src
-YCPCFLAGS = -M ../../modules -M ../../wizard/src -M ../../runlevel/src -M ../../control/src -M ../../types/src
+YCPCFLAGS = -M ../../modules -M ../../wizard/src -M ../../runlevel/src -M ../../control/src -M ../../types/src -M ../../desktop/src
module_DATA = \
CWM.ycp \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-2.21.21/library/cwm/src/Makefile.in new/yast2-2.21.22/library/cwm/src/Makefile.in
--- old/yast2-2.21.21/library/cwm/src/Makefile.in 2011-09-15 16:26:50.000000000 +0200
+++ new/yast2-2.21.22/library/cwm/src/Makefile.in 2011-09-19 13:08:27.000000000 +0200
@@ -196,7 +196,7 @@
ydatadir = @ydatadir@
yncludedir = @yncludedir@
ystartupdir = @ystartupdir@
-YCPCFLAGS = -M ../../modules -M ../../wizard/src -M ../../runlevel/src -M ../../control/src -M ../../types/src
+YCPCFLAGS = -M ../../modules -M ../../wizard/src -M ../../runlevel/src -M ../../control/src -M ../../types/src -M ../../desktop/src
module_DATA = \
CWM.ycp \
TablePopup.ycp \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-2.21.21/library/desktop/src/Desktop.ycp new/yast2-2.21.22/library/desktop/src/Desktop.ycp
--- old/yast2-2.21.21/library/desktop/src/Desktop.ycp 2011-09-15 16:26:41.000000000 +0200
+++ new/yast2-2.21.22/library/desktop/src/Desktop.ycp 2011-09-19 09:43:48.000000000 +0200
@@ -4,7 +4,7 @@
* Summary: Handling of .desktop entries
* Author: Michal Svec
*
- * $Id: Desktop.ycp 59977 2009-12-07 12:05:13Z jsrain $
+ * $Id: Desktop.ycp 65775 2011-09-19 07:43:47Z visnov $
*/
{
@@ -12,6 +12,7 @@
module "Desktop";
textdomain "base";
import "Map";
+import "Directory";
/**
* YaST configuration modules
@@ -74,6 +75,7 @@
//no translations in .desktop, check desktop_translations.mo then
string msgid = sformat("%1(%2): %3", key, fname, fallback );
+ y2debug( "Looking for key: %1", msgid );
ret = dpgettext( "desktop_translations", "/usr/share/locale", msgid );
//probably untranslated - return english name
@@ -86,6 +88,21 @@
}
/**
+ * Internal function: set up the language variables.
+ */
+void ReadLanguage() {
+ /* read language */
+ LanguageFull = "";
+ Language = UI::GetLanguage(true);
+ if(regexpmatch(Language, "(.*_[^.]*)\\.?.*")) // matches: ll_TT ll_TT.UTF-8
+ LanguageFull = regexpsub(Language, "(.*_[^.]*)\\.?.*", "\\1");
+ if(regexpmatch(Language, "(.*)_"))
+ Language = regexpsub(Language, "(.*)_", "\\1");
+ y2debug("LanguageFull=%1", LanguageFull);
+ y2debug("Language=%1", Language);
+}
+
+/**
* Read module and group data from desktop files
* @param Values list of values to be parsed (empty to read all)
*/
@@ -103,20 +120,12 @@
map filemap = $[];
path filepath = nil;
string name = nil;
+
+ ReadLanguage();
path ps = add(AgentPath, "s");
list<string> files = (list<string>) SCR::Dir(ps);
- /* read language */
- LanguageFull = "";
- Language = WFM::GetLanguage();
- if(regexpmatch(Language, "(.*_[^.]*)\\.?.*")) // matches: ll_TT ll_TT.UTF-8
- LanguageFull = regexpsub(Language, "(.*_[^.]*)\\.?.*", "\\1");
- if(regexpmatch(Language, "(.*)_"))
- Language = regexpsub(Language, "(.*)_", "\\1");
- y2debug("LanguageFull=%1", LanguageFull);
- y2debug("Language=%1", Language);
-
/* read groups */
list<string> groups = (list<string>) SCR::Dir(.yast2.groups.s);
y2debug("groups=%1", groups);
@@ -249,5 +258,71 @@
content);
}
+/**
+ * Parses the a .desktop file it gets as a parameter without trying to use
+ * already cached information or agent to access all desktop files. This is
+ * optimized version to be used for rapid start of modules.
+ * Desktop file is placed in a special directory (/usr/share/applications/YaST2).
+ * Parameter file is relative to that directory without ".desktop" suffix.
+ * Warning: There are no desktop files in inst-sys.
+ *
+ * @param file desktop file name
+ * @return map filled with data, or nil
+ *
+ * @example
+ * // Opens /usr/share/applications/YaST2/lan.desktop
+ * map description = Desktop::ParseSingleDesktopFile ("lan");
+ * Wizard::SetDialogTitle (description["Name"]:_("None));
+ */
+global map ParseSingleDesktopFile( string file )
+{
+ string filename = sformat("%1/%2.desktop", Directory::desktopdir, file);
+ // Do not use .yast2.desktop.v.$filename, because ini-agent reads
+ // all the desktop files anyway which is wasteful for setting one icon.
+ // The config is adapted from .yast2.desktop.
+ SCR::RegisterAgent (.yast2.desktop1, `ag_ini(
+ `IniAgent( filename,
+ $[
+ "options" : [ "read_only" ], // rw works but not needed
+ "comments" : [ "^[ \t]*[;#].*", ";.*", "\\{[^}]*\\}", "^[ \t]*$" ],
+ "sections" : [
+ $[ "begin" : [
+ "^[ \t]*\\[[ \t]*(.*[^ \t])[ \t]*\\][ \t]*",
+ "[%s]",
+ ]],
+ ],
+ "params" : [
+ $[ "match" : [
+ "^[ \t]*([^=]*[^ \t=])[ \t]*=[ \t]*(.*[^ \t]|)[ \t]*$" ,
+ "%s=%s",
+ ]],
+ ],
+ ]
+ ))
+ );
+
+ //non-existent file requested
+ if (SCR::Dir( .yast2.desktop1.v."Desktop Entry" ) == nil)
+ {
+ y2error ("Unknown desktop file: %1", file);
+ SCR::UnregisterAgent (.yast2.desktop1);
+ return nil;
+ }
+
+ // we need localized keys
+ ReadLanguage ();
+
+ map result = $[
+ "Icon" : (string) SCR::Read(.yast2.desktop1.v."Desktop Entry".Icon),
+ "Name" : ReadLocalizedKey (file + ".desktop", .yast2.desktop1.v."Desktop Entry", "Name"),
+ "GenericName" : ReadLocalizedKey (file + ".desktop", .yast2.desktop1.v."Desktop Entry", "GenericName")
+ ];
+
+ SCR::UnregisterAgent (.yast2.desktop1);
+
+ return result;
+}
+
+
/* EOF */
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-2.21.21/library/gpg/src/Makefile.am new/yast2-2.21.22/library/gpg/src/Makefile.am
--- old/yast2-2.21.21/library/gpg/src/Makefile.am 2011-09-15 16:26:41.000000000 +0200
+++ new/yast2-2.21.22/library/gpg/src/Makefile.am 2011-09-19 13:12:12.000000000 +0200
@@ -6,7 +6,7 @@
EXTRA_DIST = $(module_DATA)
-YCPCFLAGS = -M ../../types/src -M ../../modules -M ../../commandline/src -M ../../cwm/src -M ../../wizard/src -M ../../xml/src
+YCPCFLAGS = -M ../../types/src -M ../../modules -M ../../commandline/src -M ../../cwm/src -M ../../wizard/src -M ../../xml/src -M ../../desktop/src
include $(top_srcdir)/Makefile.am.common
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-2.21.21/library/gpg/src/Makefile.in new/yast2-2.21.22/library/gpg/src/Makefile.in
--- old/yast2-2.21.21/library/gpg/src/Makefile.in 2011-09-15 16:26:51.000000000 +0200
+++ new/yast2-2.21.22/library/gpg/src/Makefile.in 2011-09-19 13:12:42.000000000 +0200
@@ -200,7 +200,7 @@
ystartupdir = @ystartupdir@
module_DATA = GPG.ycp GPGWidgets.ycp
EXTRA_DIST = $(module_DATA)
-YCPCFLAGS = -M ../../types/src -M ../../modules -M ../../commandline/src -M ../../cwm/src -M ../../wizard/src -M ../../xml/src
+YCPCFLAGS = -M ../../types/src -M ../../modules -M ../../commandline/src -M ../../cwm/src -M ../../wizard/src -M ../../xml/src -M ../../desktop/src
modulebin_DATA = $(patsubst %.ycp,%.ybc,$(module_DATA))
modulebindir = $(moduledir)
ybcfiles = $(filter %.ybc,$(modulebin_DATA))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-2.21.21/library/log/src/Makefile.am new/yast2-2.21.22/library/log/src/Makefile.am
--- old/yast2-2.21.21/library/log/src/Makefile.am 2011-09-15 16:26:37.000000000 +0200
+++ new/yast2-2.21.22/library/log/src/Makefile.am 2011-09-19 13:09:19.000000000 +0200
@@ -7,6 +7,6 @@
EXTRA_DIST = $(module_DATA)
-YCPCFLAGS = -M ../../modules -M ../../wizard/src -M ../../cwm/src -M ../../types/src
+YCPCFLAGS = -M ../../modules -M ../../wizard/src -M ../../cwm/src -M ../../types/src -M ../../desktop/src
include $(top_srcdir)/Makefile.am.common
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-2.21.21/library/log/src/Makefile.in new/yast2-2.21.22/library/log/src/Makefile.in
--- old/yast2-2.21.21/library/log/src/Makefile.in 2011-09-15 16:26:51.000000000 +0200
+++ new/yast2-2.21.22/library/log/src/Makefile.in 2011-09-19 13:09:48.000000000 +0200
@@ -202,7 +202,7 @@
LogViewCore.ycp
EXTRA_DIST = $(module_DATA)
-YCPCFLAGS = -M ../../modules -M ../../wizard/src -M ../../cwm/src -M ../../types/src
+YCPCFLAGS = -M ../../modules -M ../../wizard/src -M ../../cwm/src -M ../../types/src -M ../../desktop/src
modulebin_DATA = $(patsubst %.ycp,%.ybc,$(module_DATA))
modulebindir = $(moduledir)
ybcfiles = $(filter %.ybc,$(modulebin_DATA))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-2.21.21/library/modules/UIHelper.ycp new/yast2-2.21.22/library/modules/UIHelper.ycp
--- old/yast2-2.21.21/library/modules/UIHelper.ycp 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-2.21.22/library/modules/UIHelper.ycp 2011-09-15 22:05:07.000000000 +0200
@@ -0,0 +1,148 @@
+/**
+ * File: modules/UIHelper.ycp
+ * Package: yast2
+ * Summary: Set of helper modules for UI formatting
+ * Authors: Stanislav Visnovsky
+ *
+ * $Id: Version.ycp.in 10158 2003-06-23 12:48:40Z visnov $
+ */
+
+{
+
+module "UIHelper";
+
+textdomain "base";
+
+
+ /**
+ * Create an edit table with basic buttons.
+ *
+ * It contains table and buttons Add, Edit, Delete. User may specify table header
+ * and content, content that will be placed above table, between table
+ * and buttons, below buttons and rights from buttons (usually another
+ * button).
+ *
+ * @param table_header Table header as defined in UI.
+ * @param table_contents Table items.
+ * @param above_table Content to place above table. There is no need to
+ * place caption here, because the dialog has its caption.
+ * Set it to nil if you do not want to place anything here.
+ * @param below_table Contents to place between table and buttons.
+ * Set it to nil if you do not want to place anything here.
+ * @param below_buttons Content to place below bottons.
+ * Set it to nil if you do not want to place anything here.
+ * @param buttons Content to place rights from buttons. Usually
+ * an additional button, e.g. Set as default.
+ * Set it to nil if you do not want to place anything here.
+ * @return Content for the SetWizardContent[Buttons]()
+ * <B>UI elements ids:</B><table>
+ * <tr><td>Table</td><td>`table</td></tr>
+ * <tr><td>Button add</td><td>`add_button</td></tr>
+ * <tr><td>Button edit</td><td>`edit_button</td></tr>
+ * <tr><td>Button delete</td><td>`delete_button</td></tr>
+ * </table>
+ */
+ global term EditTable ( term table_header,
+ list table_contents,
+ term above_table,
+ term below_table,
+ term below_buttons,
+ term buttons)
+ {
+ term contents = `VBox ();
+ if (nil != above_table)
+ {
+ contents = add (contents, above_table);
+ }
+
+ contents = add (contents,
+ `Table (
+ `id (`table),
+ `opt (`notify),
+ table_header,
+ table_contents));
+ if (nil != below_table)
+ {
+ contents = add (contents, below_table);
+ }
+
+ term but_box = `HBox (
+ `opt (`hstretch),
+ `PushButton (`id (`add_button), `opt (`key_F3), _("A&dd")),
+ `PushButton (`id (`edit_button), `opt (`key_F4), _("&Edit")),
+ `PushButton (`id (`delete_button), `opt (`key_F5), _("De&lete"))
+ );
+
+
+ if (nil != buttons)
+ {
+ but_box = add ( add ( but_box,
+ `HStretch ()),
+ buttons);
+ }
+ contents = add (contents, but_box);
+ if (nil != below_buttons)
+ {
+ contents = add (contents, below_buttons);
+ }
+ return contents;
+ }
+
+ /**
+ * Encloses the content into VBoxes and HBoxes with the appropriate
+ * spacings around it.
+ * @param content The term we are adding spacing to.
+ * @param left Spacing on the left.
+ * @param right Spacing on the right.
+ * @param top Spacing on the top.
+ * @param bottom Spacing on the bottom.
+ * @return Content with spacings around it.
+ */
+ global term SpacingAround( term content,
+ float left, float right,
+ float top, float bottom )
+ {
+ return
+ `HBox
+ (
+ `HSpacing ( left ),
+ `VBox
+ (
+ `VSpacing ( top ),
+ content,
+ `VSpacing ( bottom )
+ ),
+ `HSpacing ( right )
+ );
+ }
+
+ /**
+ * Encloses the content into VBoxes and HBoxes
+ *
+ * Enclose so that its
+ * size is at least
+ * <emphasis>xsize</emphasis> x <emphasis>ysize</emphasis>.
+ * @param xsize Minimal size of content in the X direction
+ * @param ysize Minimal size of content in the Y direction
+ * @param content Content of the dialog
+ * @return Contents sized at least <B>xsize</B> x <B>ysize</B>.
+ */
+ global term SizeAtLeast(term content, float xsize, float ysize)
+ {
+ return
+ `VBox (
+ `VSpacing (0.4),
+ `HSpacing (xsize),
+ `HBox (
+ `HSpacing (1.6),
+ `VSpacing (ysize),
+ content,
+ `HSpacing (1.6)
+ ),
+ `VSpacing (0.4)
+ );
+ }
+
+
+/* EOF */
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-2.21.21/library/modules/Version.ycp new/yast2-2.21.22/library/modules/Version.ycp
--- old/yast2-2.21.21/library/modules/Version.ycp 2011-09-15 16:26:57.000000000 +0200
+++ new/yast2-2.21.22/library/modules/Version.ycp 2011-09-19 13:01:27.000000000 +0200
@@ -20,7 +20,7 @@
/**
* Version of the yast2 package
*/
-global string yast2 = "2.21.21";
+global string yast2 = "2.21.22";
/* EOF */
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-2.21.21/library/network/src/Makefile.am new/yast2-2.21.22/library/network/src/Makefile.am
--- old/yast2-2.21.21/library/network/src/Makefile.am 2011-09-15 16:26:40.000000000 +0200
+++ new/yast2-2.21.22/library/network/src/Makefile.am 2011-09-19 13:12:33.000000000 +0200
@@ -11,5 +11,5 @@
EXTRA_DIST = $(client_DATA) $(ynclude_DATA) $(module_DATA)
# runlevel: Service, wizard: Report, Progress
-YCPCFLAGS = -M ../../types/src -M ../../modules -M ../../runlevel/src -M ../../wizard/src -M ../../cwm/src -M ../../control/src -M ../../xml/src -M ../../commandline/src -M ../../packages/src
+YCPCFLAGS = -M ../../types/src -M ../../modules -M ../../runlevel/src -M ../../wizard/src -M ../../cwm/src -M ../../control/src -M ../../xml/src -M ../../commandline/src -M ../../packages/src -M ../../desktop/src
include $(top_srcdir)/Makefile.am.common
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-2.21.21/library/network/src/Makefile.in new/yast2-2.21.22/library/network/src/Makefile.in
--- old/yast2-2.21.21/library/network/src/Makefile.in 2011-09-15 16:26:51.000000000 +0200
+++ new/yast2-2.21.22/library/network/src/Makefile.in 2011-09-19 13:12:42.000000000 +0200
@@ -205,7 +205,7 @@
EXTRA_DIST = $(client_DATA) $(ynclude_DATA) $(module_DATA)
# runlevel: Service, wizard: Report, Progress
-YCPCFLAGS = -M ../../types/src -M ../../modules -M ../../runlevel/src -M ../../wizard/src -M ../../cwm/src -M ../../control/src -M ../../xml/src -M ../../commandline/src -M ../../packages/src
+YCPCFLAGS = -M ../../types/src -M ../../modules -M ../../runlevel/src -M ../../wizard/src -M ../../cwm/src -M ../../control/src -M ../../xml/src -M ../../commandline/src -M ../../packages/src -M ../../desktop/src
modulebin_DATA = $(patsubst %.ycp,%.ybc,$(module_DATA))
modulebindir = $(moduledir)
ybcfiles = $(filter %.ybc,$(modulebin_DATA))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-2.21.21/library/packages/src/Makefile.am new/yast2-2.21.22/library/packages/src/Makefile.am
--- old/yast2-2.21.21/library/packages/src/Makefile.am 2011-09-15 16:26:41.000000000 +0200
+++ new/yast2-2.21.22/library/packages/src/Makefile.am 2011-09-19 13:11:30.000000000 +0200
@@ -2,7 +2,7 @@
yncludedir = @yncludedir@/packages
-YCPCFLAGS = -M ../../modules -M ../../wizard/src -M ../../system/src/ -M ../../types/src -M ../../commandline/src -M ../../xml/src -M ../../control/src
+YCPCFLAGS = -M ../../modules -M ../../wizard/src -M ../../system/src/ -M ../../types/src -M ../../commandline/src -M ../../xml/src -M ../../control/src -M ../../desktop/src
module_DATA = $(wildcard [[:upper:]]*.ycp)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-2.21.21/library/packages/src/Makefile.in new/yast2-2.21.22/library/packages/src/Makefile.in
--- old/yast2-2.21.21/library/packages/src/Makefile.in 2011-09-15 16:26:52.000000000 +0200
+++ new/yast2-2.21.22/library/packages/src/Makefile.in 2011-09-19 13:12:41.000000000 +0200
@@ -197,7 +197,7 @@
ydatadir = @ydatadir@
yncludedir = @yncludedir@/packages
ystartupdir = @ystartupdir@
-YCPCFLAGS = -M ../../modules -M ../../wizard/src -M ../../system/src/ -M ../../types/src -M ../../commandline/src -M ../../xml/src -M ../../control/src
+YCPCFLAGS = -M ../../modules -M ../../wizard/src -M ../../system/src/ -M ../../types/src -M ../../commandline/src -M ../../xml/src -M ../../control/src -M ../../desktop/src
module_DATA = $(wildcard [[:upper:]]*.ycp)
ynclude_DATA = \
common.ycp
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-2.21.21/library/wizard/src/Makefile.am new/yast2-2.21.22/library/wizard/src/Makefile.am
--- old/yast2-2.21.21/library/wizard/src/Makefile.am 2011-09-15 16:26:40.000000000 +0200
+++ new/yast2-2.21.22/library/wizard/src/Makefile.am 2011-09-19 13:04:32.000000000 +0200
@@ -8,12 +8,11 @@
module_DATA = \
Confirm.ycp \
Wizard.ycp \
- Wizard_hw.ycp \
Progress.ycp \
HTML.ycp
EXTRA_DIST = $(module_DATA)
-YCPCFLAGS = -M ../../modules -M ../../types/src -M ../../xml/src -M ../../commandline/src -M ../../network/src/ -M ../../runlevel/src
+YCPCFLAGS = -M ../../modules -M ../../types/src -M ../../xml/src -M ../../commandline/src -M ../../network/src/ -M ../../runlevel/src -M ../../desktop/src
include $(top_srcdir)/Makefile.am.common
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-2.21.21/library/wizard/src/Makefile.in new/yast2-2.21.22/library/wizard/src/Makefile.in
--- old/yast2-2.21.21/library/wizard/src/Makefile.in 2011-09-15 16:26:54.000000000 +0200
+++ new/yast2-2.21.22/library/wizard/src/Makefile.in 2011-09-19 13:04:51.000000000 +0200
@@ -201,12 +201,11 @@
module_DATA = \
Confirm.ycp \
Wizard.ycp \
- Wizard_hw.ycp \
Progress.ycp \
HTML.ycp
EXTRA_DIST = $(module_DATA)
-YCPCFLAGS = -M ../../modules -M ../../types/src -M ../../xml/src -M ../../commandline/src -M ../../network/src/ -M ../../runlevel/src
+YCPCFLAGS = -M ../../modules -M ../../types/src -M ../../xml/src -M ../../commandline/src -M ../../network/src/ -M ../../runlevel/src -M ../../desktop/src
modulebin_DATA = $(patsubst %.ycp,%.ybc,$(module_DATA))
modulebindir = $(moduledir)
ybcfiles = $(filter %.ybc,$(modulebin_DATA))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-2.21.21/library/wizard/src/Wizard.ycp new/yast2-2.21.22/library/wizard/src/Wizard.ycp
--- old/yast2-2.21.21/library/wizard/src/Wizard.ycp 2011-09-15 16:26:40.000000000 +0200
+++ new/yast2-2.21.22/library/wizard/src/Wizard.ycp 2011-09-15 11:45:55.000000000 +0200
@@ -12,6 +12,7 @@
module "Wizard";
textdomain "base";
+ import "Desktop";
import "Label";
import "Popup";
import "Directory";
@@ -1092,71 +1093,17 @@
*/
global boolean SetDesktopTitle( string file )
{
- path filepath = .yast2.desktop1.v."Desktop Entry";
- string name = "";
- string localizedkey = "";
- string Language = "";
- string LanguageFull = "";
- string filename = sformat("%1/%2.desktop", Directory::desktopdir, file);
- // Do not use .yast2.desktop.v.$filename, because ini-agent reads
- // all the desktop files anyway which is wasteful for setting one title.
- // The config is adapted from .yast2.desktop.
- SCR::RegisterAgent (.yast2.desktop1, `ag_ini(
- `IniAgent( filename,
- $[
- "options" : [ "read_only" ], // rw works but not needed
- "comments" : [ "^[ \t]*[;#].*", ";.*", "\\{[^}]*\\}", "^[ \t]*$" ],
- "sections" : [
- $[ "begin" : [
- "^[ \t]*\\[[ \t]*(.*[^ \t])[ \t]*\\][ \t]*",
- "[%s]",
- ]],
- ],
- "params" : [
- $[ "match" : [
- "^[ \t]*([^=]*[^ \t=])[ \t]*=[ \t]*(.*[^ \t]|)[ \t]*$" ,
- "%s=%s",
- ]],
- ],
- ]
- )));
-
-
- /* read language */
- LanguageFull = "";
- Language = UI::GetLanguage(true);
- if(regexpmatch(Language, "(.*_[^.]*)\\.?.*")) // matches: ll_TT ll_TT.UTF-8
- LanguageFull = regexpsub(Language, "(.*_[^.]*)\\.?.*", "\\1");
- if(regexpmatch(Language, "(.*)_"))
- Language = regexpsub(Language, "(.*)_", "\\1");
- y2debug("LanguageFull=%1", LanguageFull);
- y2debug("Language=%1", Language);
-
- /* get localized Name value from desktop file */
- if( LanguageFull != nil || LanguageFull != "" )
- {
- localizedkey = sformat("%1[%2]", "Name", LanguageFull);
- name = (string) SCR::Read(add(filepath, localizedkey));
- }
- if( ( name == nil || name == "" ) && ( Language != nil || Language != "" ))
- {
- localizedkey = sformat("%1[%2]", "Name", Language);
- name = (string) SCR::Read(add(filepath, localizedkey));
- }
- if( name == nil || name == "" )
- name = (string) SCR::Read(add(filepath, "Name"));
+ map description = Desktop::ParseSingleDesktopFile (file);
+
+ // fallback name for the dialog title
+ string name = description["Name"]:_("Module");
y2debug("Set dialog title: %1", name);
SetDialogTitle( name );
- SCR::UnregisterAgent (.yast2.desktop1);
-
- return ( name != nil && name != "");
+ return ( haskey(description, "Name") );
}
-
-
-
/**
* Sets the icon specified in a .desktop file got as parameter.
* Desktop file is placed in a special directory (/usr/share/applications/YaST2).
@@ -1174,46 +1121,64 @@
*/
global boolean SetDesktopIcon( string file )
{
- string filename = sformat("%1/%2.desktop", Directory::desktopdir, file);
- // Do not use .yast2.desktop.v.$filename, because ini-agent reads
- // all the desktop files anyway which is wasteful for setting one icon.
- // The config is adapted from .yast2.desktop.
- SCR::RegisterAgent (.yast2.desktop1, `ag_ini(
- `IniAgent( filename,
- $[
- "options" : [ "read_only" ], // rw works but not needed
- "comments" : [ "^[ \t]*[;#].*", ";.*", "\\{[^}]*\\}", "^[ \t]*$" ],
- "sections" : [
- $[ "begin" : [
- "^[ \t]*\\[[ \t]*(.*[^ \t])[ \t]*\\][ \t]*",
- "[%s]",
- ]],
- ],
- "params" : [
- $[ "match" : [
- "^[ \t]*([^=]*[^ \t=])[ \t]*=[ \t]*(.*[^ \t]|)[ \t]*$" ,
- "%s=%s",
- ]],
- ],
- ]
- )
- )
- );
- path filepath = .yast2.desktop1.v."Desktop Entry".Icon;
- string icon = (string) SCR::Read(filepath);
- y2debug("icon: %1 (%2)", icon, filepath);
+ map description = Desktop::ParseSingleDesktopFile (file);
+
+ // fallback name for the dialog title
+ string icon = description["Icon"]:nil;
+
+ y2debug("icon: %1", icon);
if (icon == nil)
return false;
SetTitleIcon(icon);
- SCR::UnregisterAgent (.yast2.desktop1);
-
return true;
}
+ /**
+ * Convenience function to avoid 2 calls if application needs to set
+ * both dialog title and icon from desktop file specified as parameter.
+ * Desktop file is placed in a special directory (/usr/share/applications/YaST2).
+ * Parameter file is realative to that directory without ".desktop" suffix.
+ * Warning: There are no desktop files in inst-sys.
+ *
+ * @param file desktop file name
+ * @return boolean true on success
+ *
+ * @example
+ * // Opens /usr/share/applications/YaST2/lan.desktop
+ * // Reads "Icon" and "Name" entries from there
+ * // Sets the icon, sets the dialog title
+ * SetDialogTitleAndIcon ("lan")
+ */
+ global boolean SetDesktopTitleAndIcon( string file )
+ {
+ boolean result = true;
+
+ map description = Desktop::ParseSingleDesktopFile (file);
+
+ // fallback name for the dialog title
+ string icon = description["Icon"]:nil;
+
+ y2debug("icon: %1", icon);
+
+ if (icon != nil)
+ SetTitleIcon(icon);
+ else
+ result = false;
+
+ // fallback name for the dialog title
+ string name = description["Name"]:_("Module");
+
+ y2debug("Set dialog title: %1", name);
+ SetDialogTitle( name );
+
+ return result && ( haskey(description, "Name") );
+ }
+
+
/**
* PRIVATE - Replace the entire Wizard button box with a new one.
* @param button_box Button Box term
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-2.21.21/library/wizard/src/Wizard_hw.ycp new/yast2-2.21.22/library/wizard/src/Wizard_hw.ycp
--- old/yast2-2.21.21/library/wizard/src/Wizard_hw.ycp 2011-09-15 16:26:40.000000000 +0200
+++ new/yast2-2.21.22/library/wizard/src/Wizard_hw.ycp 1970-01-01 01:00:00.000000000 +0100
@@ -1,189 +0,0 @@
-/**
- * File: modules/Wizard_hw.ycp
- * Package: yast2
- * Summary: Wizard dialogs for hardware configuration
- * Authors: Jan Holesovsky
- *
- * @deprecated This module is deprecated and will be removed soon. Use WizardHW instead.
- *
- * $Id: Wizard_hw.ycp 24837 2005-08-12 07:31:46Z visnov $
- */
-
-{
-
-module "Wizard_hw";
-textdomain "base";
-
-/**
- * Create the content of the screen with the detected devices.
- *
- * It is used in the SetWizardContent() or SetWizardContentButtons() functions.
- *
- * @param frame_label The frame around the detected devices
- * @param detected A list of the detected devices for the SelectionBox. Must contain "Other (not detected)" as the last item.
- * @param has_restart A button for restarting the detection.
- * @param already_conf A content of the RichText. Describes the already configured devices.
- * @return Content for the SetWizardContent[Buttons]()
- */
-global define term DetectedContent(string frame_label, list detected,
- boolean has_restart, string already_conf) ``{
-
- return `HBox(
- `HSpacing(1.5),
- `VBox(
- `VSpacing(0.4),
- `Frame(frame_label, `HBox(
- `HSpacing(0.5),
- `VBox(
- `SelectionBox(`id(`detected_selbox), `opt(`notify),
- _("A&vailable are:"), detected),
- `HBox(
- (has_restart? `PushButton(`id(`restart_button),
- _("Re&start detection")): `HSpacing(0.5)),
- `HStretch(),
- `PushButton(`id(`configure_button), `opt (`key_F3), _("&Configure..."))
- )
- ),
- `HSpacing(0.5)
- )),
- `VSpacing(0.3),
- `RichText(`id(`configured_richtext), already_conf),
- `Right(`PushButton(`id(`edit_button), `opt (`key_F4), _("C&hange..."))),
- `VSpacing(0.4)
- ),
- `HSpacing(1.5)
- );
-
-}
-
- /**
- * Create the contents of screen with configured items.
- *
- * It contains table and buttons Add, Edit, Delete. User may specify table header
- * and content, content that will be placed above table, between table
- * and buttons, below buttons and rights from buttons (usually another
- * button).
- *
- * @param table_header Table header as defined in UI.
- * @param table_contents Table items.
- * @param above_table Content to place above table. There is no need to
- * place caption here, because the dialog has its caption.
- * Set it to nil if you do not want to place anything here.
- * @param below_table Contents to place between table and buttons.
- * Set it to nil if you do not want to place anything here.
- * @param below_buttons Content to place below bottons.
- * Set it to nil if you do not want to place anything here.
- * @param buttons Content to place rights from buttons. Usually
- * an additional button, e.g. Set as default.
- * Set it to nil if you do not want to place anything here.
- * @return Content for the SetWizardContent[Buttons]()
- * <B>UI elements ids:</B><table>
- * <tr><td>Table</td><td>`table</td></tr>
- * <tr><td>Button add</td><td>`add_button</td></tr>
- * <tr><td>Button edit</td><td>`edit_button</td></tr>
- * <tr><td>Button delete</td><td>`delete_button</td></tr>
- * </table>
- */
- global define term ConfiguredContent ( term table_header,
- list table_contents,
- term above_table,
- term below_table,
- term below_buttons,
- term buttons)
- ``{
- term contents = `VBox ();
- if (nil != above_table)
- {
- contents = add (contents, above_table);
- }
-
- contents = add (contents,
- `Table (
- `id (`table),
- `opt (`notify),
- table_header,
- table_contents));
- if (nil != below_table)
- {
- contents = add (contents, below_table);
- }
-
- term but_box = `HBox (
- `opt (`hstretch),
- `PushButton (`id (`add_button), `opt (`key_F3), _("A&dd")),
- `PushButton (`id (`edit_button), `opt (`key_F4), _("&Edit")),
- `PushButton (`id (`delete_button), `opt (`key_F5), _("De&lete"))
- );
-
-
- if (nil != buttons)
- {
- but_box = add ( add ( but_box,
- `HStretch ()),
- buttons);
- }
- contents = add (contents, but_box);
- if (nil != below_buttons)
- {
- contents = add (contents, below_buttons);
- }
- return contents;
- }
-
- /**
- * Encloses the content into VBoxes and HBoxes with the appropriate
- * spacings around it.
- * @param content The term we are adding spacing to.
- * @param left Spacing on the left.
- * @param right Spacing on the right.
- * @param top Spacing on the top.
- * @param bottom Spacing on the bottom.
- * @return Content with spacings around it.
- */
- global define term SpacingAround( term content,
- float left, float right,
- float top, float bottom )
- ``{
- return
- `HBox
- (
- `HSpacing ( left ),
- `VBox
- (
- `VSpacing ( top ),
- content,
- `VSpacing ( bottom )
- ),
- `HSpacing ( right )
- );
- }
-
- /**
- * Encloses the content into VBoxes and HBoxes
- *
- * Enclose so that its
- * size is at least
- * <emphasis>xsize</emphasis> x <emphasis>ysize</emphasis>.
- * @param xsize Minimal size of content in the X direction
- * @param ysize Minimal size of content in the Y direction
- * @param content Content of the dialog
- * @return Contents sized at least <B>xsize</B> x <B>ysize</B>.
- */
- global define term SizeAtLeast(term content, float xsize, float ysize)
- ``{
- return
- `VBox (
- `VSpacing (0.4),
- `HSpacing (xsize),
- `HBox (
- `HSpacing (1.6),
- `VSpacing (ysize),
- content,
- `HSpacing (1.6)
- ),
- `VSpacing (0.4)
- );
- }
-
-/* EOF */
-}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org