Hello community,
here is the log from the commit of package yast2-core
checked in at Thu Dec 7 21:41:31 CET 2006.
--------
--- yast2-core/yast2-core.changes 2006-10-31 16:58:12.000000000 +0100
+++ /mounts/work_src_done/STABLE/yast2-core/yast2-core.changes 2006-12-06 17:05:48.000000000 +0100
@@ -1,0 +2,20 @@
+Tue Dec 5 10:31:13 CET 2006 - kmachalkova@suse.cz
+
+- Added RunInTerminal UI builtin for running external programs from
+ ncurses UI (#148683, #221254, #222547)
+- 2.15.1
+
+-------------------------------------------------------------------
+Tue Dec 5 10:54:41 CET 2006 - mvidner@suse.cz
+
+- ini-agent with repeat_names: do not merge sections with same name
+ when parsing. They can be accessed using .all. (#224414)
+
+-------------------------------------------------------------------
+Tue Dec 5 08:45:30 CET 2006 - mvidner@suse.cz
+
+- Do not abort if a nonterm is passed to `ReplacePoint or `*Squash
+ (#225815).
+- 2.15.0
+
+-------------------------------------------------------------------
Old:
----
yast2-core-2.14.4.tar.bz2
New:
----
yast2-core-2.15.1.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-core.spec ++++++
--- /var/tmp/diff_new_pack.9vWyja/_old 2006-12-07 21:41:09.000000000 +0100
+++ /var/tmp/diff_new_pack.9vWyja/_new 2006-12-07 21:41:09.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-core (Version 2.14.4)
+# spec file for package yast2-core (Version 2.15.1)
#
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -11,12 +11,12 @@
# norootforbuild
Name: yast2-core
-Version: 2.14.4
+Version: 2.15.1
Release: 1
-License: GNU General Public License (GPL) - all versions
+License: GNU General Public License (GPL)
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-core-2.14.4.tar.bz2
+Source0: yast2-core-2.15.1.tar.bz2
prefix: /usr
# obviously
BuildRequires: gcc-c++
@@ -114,7 +114,7 @@
Stanislav Visnovsky
%prep
-%setup -n yast2-core-2.14.4
+%setup -n yast2-core-2.15.1
%build
%{prefix}/bin/y2tool y2autoconf
@@ -186,6 +186,17 @@
/usr/share/YaST2/data/devtools/bin/generateYCPWrappers
%changelog -n yast2-core
+* Tue Dec 05 2006 - mvidner@suse.cz
+- ini-agent with repeat_names: do not merge sections with same name
+ when parsing. They can be accessed using .all. (#224414)
+* Tue Dec 05 2006 - kmachalkova@suse.cz
+- Added RunInTerminal UI builtin for running external programs from
+ ncurses UI (#148683, #221254, #222547)
+- 2.15.1
+* Tue Dec 05 2006 - mvidner@suse.cz
+- Do not abort if a nonterm is passed to `ReplacePoint or `*Squash
+ (#225815).
+- 2.15.0
* Tue Oct 31 2006 - mvidner@suse.cz
- ini-agent: use C locale when building regular expressions so that
A-Z works for Estonian (#177560).
++++++ yast2-core-2.14.4.tar.bz2 -> yast2-core-2.15.1.tar.bz2 ++++++
++++ 36813 lines of diff (skipped)
++++ retrying with extended exclude list
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-core-2.14.4/VERSION new/yast2-core-2.15.1/VERSION
--- old/yast2-core-2.14.4/VERSION 2006-10-31 16:49:26.000000000 +0100
+++ new/yast2-core-2.15.1/VERSION 2006-12-05 10:30:59.000000000 +0100
@@ -1 +1 @@
-2.14.4
+2.15.1
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-core-2.14.4/agent-ini/src/IniFile.cc new/yast2-core-2.15.1/agent-ini/src/IniFile.cc
--- old/yast2-core-2.14.4/agent-ini/src/IniFile.cc 2006-09-19 14:20:01.000000000 +0200
+++ new/yast2-core-2.15.1/agent-ini/src/IniFile.cc 2006-12-06 16:02:44.000000000 +0100
@@ -8,7 +8,7 @@
* Petr Blahos
* Martin Vidner
*
- * $Id: IniFile.cc 32969 2006-09-19 12:21:30Z mvidner $
+ * $Id: IniFile.cc 34764 2006-12-05 10:02:13Z mvidner $
*/
#include
@@ -105,7 +105,7 @@
ivalues.insert (IniEntryIndex::value_type (k, --container.end ()));
}
-void IniSection::initSection (const string&name,const string&comment,int rb, int wb)
+IniSection& IniSection::initSection (const string&name,const string&comment,int rb, int wb)
{
string k = ip->changeCase (name);
@@ -141,6 +141,8 @@
container.push_back (ce);
// index it
isections.insert (IniSectionIndex::value_type (k, --container.end ()));
+ // return reference to the new copy(!)
+ return container.back().s();
}
IniSection& IniSection::findSection(const vector<string>&path, int from)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-core-2.14.4/agent-ini/src/IniFile.h new/yast2-core-2.15.1/agent-ini/src/IniFile.h
--- old/yast2-core-2.14.4/agent-ini/src/IniFile.h 2006-09-19 14:20:01.000000000 +0200
+++ new/yast2-core-2.15.1/agent-ini/src/IniFile.h 2006-12-06 16:02:44.000000000 +0100
@@ -8,7 +8,7 @@
* Petr Blahos
* Martin Vidner
*
- * $Id: IniFile.h 32969 2006-09-19 12:21:30Z mvidner $
+ * $Id: IniFile.h 34764 2006-12-05 10:02:13Z mvidner $
*/
#ifndef __IniFile_h__
@@ -493,8 +493,9 @@
* @param comment comment
* @param rb read-by
* @param wb rewrite-by. if -2 (default), it is not changed
+ * @return a reference to the section
*/
- void initSection (const string&name,const string&comment,int rb, int wb=-2);
+ IniSection& initSection (const string&name,const string&comment,int rb, int wb=-2);
/**
* This function has very special purpose, it ensures that top-section
* delimiter is not written when saving multiple files.
@@ -524,6 +525,7 @@
virtual void clean();
/**
+ * OBSOLETE, to be removed.
* Gets section on a path. Recursive. Attention! This function
* aborts when it doesn't find the section! Use with care!
* (Used only by IniParser::parse_helper)
@@ -533,6 +535,7 @@
*/
IniSection& findSection(const vector<string>&path, int from = 0);
/**
+ * OBSOLETE, to be removed.
* If currently parsed end-section-tag hasn't matched currently
* processed section by name, we need to find the best possible match
* by type (read_by). Hence we
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-core-2.14.4/agent-ini/src/IniParser.cc new/yast2-core-2.15.1/agent-ini/src/IniParser.cc
--- old/yast2-core-2.14.4/agent-ini/src/IniParser.cc 2006-10-31 16:58:23.000000000 +0100
+++ new/yast2-core-2.15.1/agent-ini/src/IniParser.cc 2006-12-06 16:02:44.000000000 +0100
@@ -8,7 +8,7 @@
* Petr Blahos
* Martin Vidner
*
- * $Id: IniParser.cc 33951 2006-10-31 15:58:21Z mvidner $
+ * $Id: IniParser.cc 34764 2006-12-05 10:02:13Z mvidner $
*/
#include "config.h"
@@ -537,8 +537,8 @@
string line;
size_t i;
- // stack of section names
- vector<string>path;
+ // stack of open sections, innermost at front
+ list open_sections;
//
// read line
@@ -590,7 +590,7 @@
state = 0;
val = val + (join_multiline ? " " : "\n") + m[1];
line = m.rest;
- if (!path.size())
+ if (open_sections.empty ())
{ // we are in toplevel section, going deeper
// check for toplevel values allowance
if (!global_values)
@@ -598,10 +598,9 @@
else
ini.initValue (key, val, comment, matched_by);
}
- else
- {
- ini.findSection(path).initValue(key, val, comment, matched_by);
- }
+ else {
+ open_sections.front()->initValue(key, val, comment, matched_by);
+ }
comment = "";
}
else
@@ -628,25 +627,28 @@
if (i < sections.size ())
{
// section begin found !!! check conditions
- if (path.size())
+ if (!open_sections.empty())
{ // there were some sections
// is there need to close previous section?
- if (sectionNeedsEnd(ini.findSection(path).getReadBy()))
+ IniSection * cur = open_sections.front();
+ if (sectionNeedsEnd(cur->getReadBy()))
{
if(no_nested_sections)
{
scanner_error ("Section %s started but section %s is not finished",
found.c_str(),
- path[path.size()-1].c_str());
- path.pop_back();
+ cur->getName());
+ open_sections.pop_front();
}
}
else
- path.pop_back();
+ open_sections.pop_front();
}
- if (!path.size())
+
+ IniSection * parent = NULL;
+ if (open_sections.empty())
{ // we are in toplevel section, going deeper
- ini.initSection (found, comment, i);
+ parent = &ini;
}
else
{
@@ -654,11 +656,14 @@
scanner_error ("Attempt to create nested section %s.", found.c_str ());
else
{
- ini.findSection(path).initSection(found, comment, i);
+ parent = open_sections.front();
}
}
+
+ if (parent)
+ open_sections.push_front (& parent->initSection (found, comment, i));
+
comment = "";
- path.push_back(found);
}
} // check for section begin
@@ -687,51 +692,55 @@
// comment
if (!comment.empty ())
{
- if (!path.size())
+ if (open_sections.empty())
ini.setEndComment (comment.c_str ());
else
{
- ini.findSection(path).setEndComment (comment.c_str ());
+ open_sections.front()->setEndComment (comment.c_str ());
}
comment = "";
}
- if (!path.size ())
+ if (open_sections.empty ())
scanner_error ("Nothing to close.");
- else if (!found.empty ())
- { // there is a subexpression
- int len = path.size ();
- int j;
-
- for (j = len - 1; j >= 0;j--)
- if (path[j] == found)
- {
- path.resize (j);
+ else {
+ list::iterator
+ b = open_sections.begin(),
+ e = open_sections.end(),
+ it;
+
+ string name_to_close = found;
+ bool complain = false;
+
+ if (!name_to_close.empty ())
+ { // there is a subexpression (section name)
+ for (it = b; it != e; ++it) {
+ if ((*it)->getName() == name_to_close)
break;
- }
- if (j == -1)
- { // we did not find, so close the first that needs it
- int m = ini.findEndFromUp (path, i);
- int toclose = len - 1;
- if (-1 != m)
- {
- toclose = m - 1;
- }
- scanner_error ("Unexpected closing %s. Closing section %s.", found.c_str(), path[toclose].c_str());
- path.resize (toclose);
+ }
+
+ if (it == e) {
+ // no match by name, try matching by type
+ name_to_close = "";
+ complain = true;
}
}
- else
- { // there is no subexpression
- int m = ini.findEndFromUp (path, i);
- if (-1 != m) // we have perfect match
- {
- path.resize(m - 1);
+
+ if (name_to_close.empty ()) {
+ // there was no name or we did not find the specified one
+ for (it = b; it != e; ++it) {
+ if ((*it)->getReadBy() == i)
+ break;
}
- else if ((i = path.size ()) > 0)
- {
- path.resize (i - 1);
+ if (it == e) {
+ // not even a match by type
+ it = b;
}
+
+ if (complain)
+ scanner_error ("Unexpected closing %s. Closing section %s.", found.c_str(), (*it)->getName());
}
+ open_sections.erase (b, ++it);
+ }
}
}
@@ -753,7 +762,7 @@
}
if (i != params.size ())
{
- if (!path.size())
+ if (open_sections.empty())
{ // we are in toplevel section, going deeper
// check for toplevel values allowance
if (!global_values)
@@ -763,7 +772,7 @@
}
else
{
- ini.findSection(path).initValue(key, val, comment, i);
+ open_sections.front()->initValue(key, val, comment, i);
}
comment = "";
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-core-2.14.4/agent-ini/testsuite/tests/repeat_opt.in new/yast2-core-2.15.1/agent-ini/testsuite/tests/repeat_opt.in
--- old/yast2-core-2.14.4/agent-ini/testsuite/tests/repeat_opt.in 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-core-2.15.1/agent-ini/testsuite/tests/repeat_opt.in 2006-12-06 16:02:45.000000000 +0100
@@ -0,0 +1,18 @@
+;
+; leading comment
+;
+[Section1]
+val1=1
+val2=2
+val1=3
+
+[Section2]
+val1=10
+val2=20
+
+[Section2]
+val2=40
+val3=30
+;
+; trailing comment
+;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-core-2.14.4/agent-ini/testsuite/tests/repeat_opt.out new/yast2-core-2.15.1/agent-ini/testsuite/tests/repeat_opt.out
--- old/yast2-core-2.14.4/agent-ini/testsuite/tests/repeat_opt.out 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-core-2.15.1/agent-ini/testsuite/tests/repeat_opt.out 2006-12-06 16:02:45.000000000 +0100
@@ -0,0 +1,19 @@
+(["Section1", "Section2", "Section2"])
+;
+; leading comment
+;
+[Section1]
+val1=1
+val2=2
+val1=3
+
+[Section2]
+val1=10
+val2=20
+
+[Section2]
+val2=40
+val3=30
+;
+; trailing comment
+;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-core-2.14.4/agent-ini/testsuite/tests/repeat_opt.scr new/yast2-core-2.15.1/agent-ini/testsuite/tests/repeat_opt.scr
--- old/yast2-core-2.14.4/agent-ini/testsuite/tests/repeat_opt.scr 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-core-2.15.1/agent-ini/testsuite/tests/repeat_opt.scr 2006-12-06 16:02:45.000000000 +0100
@@ -0,0 +1,20 @@
+.
+
+`ag_ini(
+ `IniAgent("tests/repeat_opt.in.test",
+ $[
+ "options" : [ "repeat_names" ],
+ "comments": [ "^[ \t]*;.*", ";.*", "^[ \t]*$" ],
+ "sections" : [
+ $[
+ "begin" : [ "[ \t]*\\[[ \t]*(.*[^ \t])[ \t]*\\][ \t]*", "[%s]" ],
+ ],
+ ],
+ "params" : [
+ $[
+ "match" : [ "^[ \t]*([^=]*[^ \t=])[ \t]*=[ \t]*(.*[^ \t]|)[ \t]*$" , "%s=%s"],
+ ],
+ ],
+ ]
+ )
+)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-core-2.14.4/agent-ini/testsuite/tests/repeat_opt.ycp new/yast2-core-2.15.1/agent-ini/testsuite/tests/repeat_opt.ycp
--- old/yast2-core-2.14.4/agent-ini/testsuite/tests/repeat_opt.ycp 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-core-2.15.1/agent-ini/testsuite/tests/repeat_opt.ycp 2006-12-06 16:02:45.000000000 +0100
@@ -0,0 +1,7 @@
+/*
+ * Preserve duplications. See also #224414.
+ */
+{
+ SCR::Write (., "force");
+ return SCR::Dir (.s);
+}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-core-2.14.4/config.h.in new/yast2-core-2.15.1/config.h.in
--- old/yast2-core-2.14.4/config.h.in 2006-10-31 17:00:51.000000000 +0100
+++ new/yast2-core-2.15.1/config.h.in 2006-12-06 16:57:35.000000000 +0100
@@ -65,7 +65,7 @@
/* If using the C implementation of alloca, define if you know the
direction of stack growth for your system; otherwise it will be
- automatically deduced at run-time.
+ automatically deduced at runtime.
STACK_DIRECTION > 0 => grows toward higher addresses
STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown */
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-core-2.14.4/configure.in new/yast2-core-2.15.1/configure.in
--- old/yast2-core-2.14.4/configure.in 2006-10-31 16:58:35.000000000 +0100
+++ new/yast2-core-2.15.1/configure.in 2006-12-06 16:57:22.000000000 +0100
@@ -1,9 +1,9 @@
dnl configure.in for yast2-core
dnl
-dnl -- This file is generated by y2autoconf 2.13.27 - DO NOT EDIT! --
+dnl -- This file is generated by y2autoconf 2.14.0 - DO NOT EDIT! --
dnl (edit configure.in.in instead)
-AC_INIT(yast2-core, 2.14.4, http://bugs.opensuse.org/, yast2-core)
+AC_INIT(yast2-core, 2.15.1, http://bugs.opensuse.org/, yast2-core)
dnl Check for presence of file 'RPMNAME'
AC_CONFIG_SRCDIR([RPMNAME])
@@ -17,7 +17,7 @@
AM_INIT_AUTOMAKE(tar-ustar) dnl searches for some needed programs
dnl Important YaST2 variables
-VERSION="2.14.4"
+VERSION="2.15.1"
RPMNAME="yast2-core"
MAINTAINER="Martin Vidner "
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-core-2.14.4/libycp/src/parser.h new/yast2-core-2.15.1/libycp/src/parser.h
--- old/yast2-core-2.14.4/libycp/src/parser.h 2006-09-19 17:01:02.000000000 +0200
+++ new/yast2-core-2.15.1/libycp/src/parser.h 2006-12-01 15:35:18.000000000 +0100
@@ -1,7 +1,9 @@
-/* A Bison parser, made by GNU Bison 2.1. */
+/* A Bison parser, made by GNU Bison 2.3. */
-/* Skeleton parser for Yacc-like parsing with Bison,
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+/* Skeleton interface for Bison's Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -18,10 +20,18 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
-/* As a special exception, when this file is copied by Bison into a
- Bison output file, you may use that output file without restriction.
- This special exception was added by the Free Software Foundation
- in version 1.24 of Bison. */
+/* As a special exception, you may create a larger work that contains
+ part or all of the Bison parser skeleton and distribute that work
+ under terms of your choice, so long as that work isn't itself a
+ parser generator using the skeleton or a modified version thereof
+ as a parser skeleton. Alternatively, if you modify or redistribute
+ the parser skeleton itself, you may (at your option) remove this
+ special exception, which will cause the skeleton and the resulting
+ Bison output files to be licensed under the GNU General Public
+ License without this special exception.
+
+ This special exception was added by the Free Software Foundation in
+ version 2.2 of Bison. */
/* Tokens. */
#ifndef YYTOKENTYPE
@@ -164,7 +174,7 @@
-#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
+#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef int YYSTYPE;
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
@@ -173,5 +183,3 @@
-
-
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-core-2.14.4/libyui/src/YUI_bindings.cc new/yast2-core-2.15.1/libyui/src/YUI_bindings.cc
--- old/yast2-core-2.14.4/libyui/src/YUI_bindings.cc 2006-09-19 13:58:47.000000000 +0200
+++ new/yast2-core-2.15.1/libyui/src/YUI_bindings.cc 2006-12-06 16:55:52.000000000 +0100
@@ -101,6 +101,14 @@
return YCPVoid();
}
+static YCPValue
+UIRunInTerminal( const YCPString &module )
+{
+ if (YUIComponent::ui() )
+ return YUIComponent::ui()->evaluateRunInTerminal( module );
+ else
+ return YCPVoid();
+}
static YCPValue
UIGetLanguage( const YCPBoolean & strip )
@@ -649,6 +657,7 @@
{ "SetProductName", "void (string)", (void*) UISetProductName },
{ "SetConsoleFont", "void (string, string, string, string, string)", (void*) UISetConsoleFont },
{ "SetKeyboard", "void ()", (void*) UISetKeyboard },
+ { "RunInTerminal", "integer (string)", (void*) UIRunInTerminal },
{ "BusyCursor", "void ()", (void*) UIBusyCursor },
{ "NormalCursor", "void ()", (void*) UINormalCursor },
{ "RedrawScreen", "void ()", (void*) UIRedrawScreen },
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-core-2.14.4/libyui/src/YUI_builtins.cc new/yast2-core-2.15.1/libyui/src/YUI_builtins.cc
--- old/yast2-core-2.14.4/libyui/src/YUI_builtins.cc 2006-09-19 13:58:47.000000000 +0200
+++ new/yast2-core-2.15.1/libyui/src/YUI_builtins.cc 2006-12-06 16:57:16.000000000 +0100
@@ -230,6 +230,37 @@
/**
+ * @builtin RunInTerminal
+ * @short runs external program in the same terminal
+ * @description
+ * Use this builtin if you want to run external program from ncurses UI
+ * as a separate process. It saves current window layout to the stack and
+ * runs the external program in the same terminal. When done, it restores
+ * the original window layout and returns exit code of the external program
+ * (an integer value returned by system() call). When called from Qt UI,
+ * an error message is printed to the log.
+ * @param string external_program
+ * return integer
+ *
+ * @usage RunInTerminal("/bin/bash")
+ */
+
+YCPInteger YUI::evaluateRunInTerminal(const YCPString & module )
+{
+ int ret = runInTerminal( module );
+
+ return YCPInteger ( ret );
+
+}
+
+int YUI::runInTerminal ( const YCPString & module )
+{
+ y2error("Not in text-mode: Cannot run external program in terminal.");
+
+ return -1;
+}
+
+/**
* @builtin SetKeyboard
* @short Sets Keyboard
*
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-core-2.14.4/libyui/src/YUI_widgets.cc new/yast2-core-2.15.1/libyui/src/YUI_widgets.cc
--- old/yast2-core-2.14.4/libyui/src/YUI_widgets.cc 2006-09-19 13:58:43.000000000 +0200
+++ new/yast2-core-2.15.1/libyui/src/YUI_widgets.cc 2006-12-05 10:30:22.000000000 +0100
@@ -342,7 +342,7 @@
{
if ( term->size() != argnr+1 ||
term->value( argnr ).isNull() ||
- term->value( argnr )->isVoid() )
+ ! term->value( argnr )->isTerm() )
{
y2error( "Invalid arguments for the ReplacePoint widget: %s",
term->toString().c_str() );
@@ -889,7 +889,9 @@
int argnr, YRadioButtonGroup * rbg,
bool hsquash, bool vsquash )
{
- if ( term->size() != argnr+1 )
+ if ( term->size() != argnr+1 ||
+ term->value( argnr ).isNull() ||
+ ! term->value( argnr )->isTerm() )
{
y2error( "%s: The squash widgets take one widget as argument",
term->toString().c_str() );
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-core-2.14.4/libyui/src/include/YUI.h new/yast2-core-2.15.1/libyui/src/include/YUI.h
--- old/yast2-core-2.14.4/libyui/src/include/YUI.h 2006-09-19 13:58:45.000000000 +0200
+++ new/yast2-core-2.15.1/libyui/src/include/YUI.h 2006-12-06 16:48:43.000000000 +0100
@@ -322,6 +322,7 @@
const YCPString& unicode_map,
const YCPString& encoding );
void evaluateSetKeyboard ();
+ YCPInteger evaluateRunInTerminal ( const YCPString& module);
YCPBoolean evaluateSetFocus ( const YCPValue & value_id );
void evaluateSetFunctionKeys ( const YCPMap & new_keys );
void evaluateSetLanguage ( const YCPString& lang, const YCPString& encoding = YCPNull() );
@@ -811,6 +812,15 @@
virtual YCPValue setKeyboard();
+
+ /**
+ * UI-specific runInTerminal() function.
+ * Returns (integer) return code of external program it spawns
+ * in the same terminal
+ */
+
+ virtual int runInTerminal( const YCPString & module );
+
/**
* UI-specific getDisplayInfo() functions.
* See UI builtin GetDisplayInfo() doc for details.
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-core-2.14.4/libyui/src/include/YUISymbols.h new/yast2-core-2.15.1/libyui/src/include/YUISymbols.h
--- old/yast2-core-2.14.4/libyui/src/include/YUISymbols.h 2006-09-19 13:58:43.000000000 +0200
+++ new/yast2-core-2.15.1/libyui/src/include/YUISymbols.h 2006-12-04 16:30:55.000000000 +0100
@@ -51,6 +51,7 @@
#define YUIBuiltin_SetFocus "SetFocus"
#define YUIBuiltin_SetFunctionKeys "SetFunctionKeys"
#define YUIBuiltin_SetKeyboard "SetKeyboard"
+#define YUIBuiltin_RunInTerminal "RunInTerminal"
#define YUIBuiltin_SetLanguage "SetLanguage"
#define YUIBuiltin_SetModulename "SetModulename"
#define YUIBuiltin_SetProductName "SetProductName"
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org