Hello community,
here is the log from the commit of package yast2-sound for openSUSE:Factory
checked in at Wed Jan 14 02:00:36 CET 2009.
--------
--- yast2-sound/yast2-sound.changes 2009-01-09 16:30:28.000000000 +0100
+++ /mounts/work_src_done/STABLE/yast2-sound/yast2-sound.changes 2009-01-14 02:00:07.842064000 +0100
@@ -1,0 +2,5 @@
+Tue Jan 13 15:19:13 CET 2009 - lslezak@suse.cz
+
+- 2.18.0
+
+-------------------------------------------------------------------
@@ -5 +10,17 @@
-- 2.17.14
+
+-------------------------------------------------------------------
+Fri Jan 9 09:26:30 CET 2009 - lslezak@suse.cz
+
+- make channel names unique - add channel index to channel name
+ if more channels have the same name, fixes UI syntax error
+ for some sound cards (bnc#407060)
+
+-------------------------------------------------------------------
+Fri Dec 19 15:18:05 CET 2008 - lslezak@suse.cz
+
+- removed the progress dialog at start up (bnc#447573)
+- abort immediately when there is no change (bnc#458317)
+- sound, joystick - hide the Back button in the overview dialog
+ (bnc#440561, bnc#440559)
+- allow entering only ASCII characters in the kernel module options
+ dialog (bnc#447018)
calling whatdependson for head-i586
Old:
----
yast2-sound-2.17.14.tar.bz2
New:
----
yast2-sound-2.18.0.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-sound.spec ++++++
--- /var/tmp/diff_new_pack.rh8482/_old 2009-01-14 02:00:20.000000000 +0100
+++ /var/tmp/diff_new_pack.rh8482/_new 2009-01-14 02:00:20.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-sound (Version 2.17.14)
+# spec file for package yast2-sound (Version 2.18.0)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -19,12 +19,12 @@
Name: yast2-sound
-Version: 2.17.14
+Version: 2.18.0
Release: 1
License: GPL v2 or later
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-sound-2.17.14.tar.bz2
+Source0: yast2-sound-2.18.0.tar.bz2
Prefix: /usr
BuildRequires: alsa-devel doxygen gcc-c++ perl-XML-Writer update-desktop-files yast2 yast2-core-devel yast2-devtools yast2-testsuite
# GetInstArgs::automatic_configuration
@@ -48,7 +48,7 @@
Dan Meszaros
%prep
-%setup -n yast2-sound-2.17.14
+%setup -n yast2-sound-2.18.0
%build
%{prefix}/bin/y2tool y2autoconf
@@ -93,10 +93,23 @@
%{_libdir}/YaST2/plugin/libpy2ag_audio.so*
/usr/share/YaST2/scrconf/*.scr
%doc %{prefix}/share/doc/packages/yast2-sound
+
%changelog
+* Tue Jan 13 2009 lslezak@suse.cz
+- 2.18.0
* Fri Jan 09 2009 lslezak@suse.cz
- fixed snd slots option for snd-aoa driver (PPC) (bnc#460338)
-- 2.17.14
+* Fri Jan 09 2009 lslezak@suse.cz
+- make channel names unique - add channel index to channel name
+ if more channels have the same name, fixes UI syntax error
+ for some sound cards (bnc#407060)
+* Fri Dec 19 2008 lslezak@suse.cz
+- removed the progress dialog at start up (bnc#447573)
+- abort immediately when there is no change (bnc#458317)
+- sound, joystick - hide the Back button in the overview dialog
+ (bnc#440561, bnc#440559)
+- allow entering only ASCII characters in the kernel module options
+ dialog (bnc#447018)
* Thu Dec 18 2008 ro@suse.de
- fix build for non-alsa case (s390)
* Tue Dec 02 2008 lslezak@suse.cz
++++++ yast2-sound-2.17.14.tar.bz2 -> yast2-sound-2.18.0.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-sound-2.17.14/agent-audio/src/AlsaAudio.cc new/yast2-sound-2.18.0/agent-audio/src/AlsaAudio.cc
--- old/yast2-sound-2.17.14/agent-audio/src/AlsaAudio.cc 2009-01-09 16:27:14.000000000 +0100
+++ new/yast2-sound-2.18.0/agent-audio/src/AlsaAudio.cc 2009-01-09 16:19:01.000000000 +0100
@@ -1,10 +1,7 @@
-#include
#include "AlsaAudio.h"
-#include
-#include
-
+#include
#ifdef __sparc__
#define __HAVE_ALSA 0
@@ -57,8 +54,9 @@
return YCPNull(); \
}
+#include "YastChannelId.h"
-YCPValue alsaGetVolume(int card_id, const string& channel)
+YCPValue alsaGetVolume(int card_id, const string& channel_name)
{
INIT_MIXER
@@ -67,11 +65,19 @@
snd_mixer_selem_channel_id_t chn;
+ YastChannelId ch_id(channel_name);
+ std::string channel(ch_id.name());
+ unsigned ch_index = ch_id.index();
+
+ y2debug("Channel Id: '%s' => name: '%s', index: %u", channel_name.c_str(), channel.c_str(), ch_index);
for (elem = snd_mixer_first_elem(handle); elem; elem = snd_mixer_elem_next(elem))
{
snd_mixer_selem_get_id(elem, sid);
+
+ // is it the required channel?
if (snd_mixer_selem_id_get_name(sid) == channel
+ && snd_mixer_selem_get_index(elem) == ch_index
&& snd_mixer_selem_is_active(elem)
&& snd_mixer_selem_has_playback_volume(elem))
{
@@ -96,11 +102,13 @@
}
}
+ y2warning("Card %d: channel '%s' not found", card_id, channel_name.c_str());
+
snd_mixer_close(handle);
return YCPInteger((long long)0);
}
-YCPValue alsaGetMute(int card_id, const string& channel)
+YCPValue alsaGetMute(int card_id, const string& channel_name)
{
INIT_MIXER
@@ -108,10 +116,17 @@
snd_mixer_selem_channel_id_t chn;
+ YastChannelId ch_id(channel_name);
+ std::string channel(ch_id.name());
+ unsigned ch_index = ch_id.index();
+
+ y2debug("Channel Id: '%s' => name: '%s', index: %u", channel_name.c_str(), channel.c_str(), ch_index);
+
for (elem = snd_mixer_first_elem(handle); elem; elem = snd_mixer_elem_next(elem))
{
snd_mixer_selem_get_id(elem, sid);
if (snd_mixer_selem_id_get_name(sid) == channel
+ && snd_mixer_selem_get_index(elem) == ch_index
&& snd_mixer_selem_is_active(elem)
&& snd_mixer_selem_has_playback_switch(elem))
{
@@ -128,21 +143,29 @@
}
}
+ y2warning("Card %d: channel '%s' not found", card_id, channel_name.c_str());
+
snd_mixer_close(handle);
return YCPBoolean(false);
}
-YCPBoolean alsaSetVolume(int card_id, const string& channel, int value)
+YCPBoolean alsaSetVolume(int card_id, const string& channel_name, int value)
{
INIT_MIXER
long from, to, val;
+ YastChannelId ch_id(channel_name);
+ std::string channel(ch_id.name());
+ unsigned ch_index = ch_id.index();
+
+ y2debug("Channel Id: '%s' => name: '%s', index: %u", channel_name.c_str(), channel.c_str(), ch_index);
for (elem = snd_mixer_first_elem(handle); elem; elem = snd_mixer_elem_next(elem))
{
snd_mixer_selem_get_id(elem, sid);
if (snd_mixer_selem_id_get_name(sid) == channel
+ && snd_mixer_selem_get_index(elem) == ch_index
&& snd_mixer_selem_is_active(elem)
&& snd_mixer_selem_has_playback_volume(elem))
{
@@ -157,20 +180,27 @@
}
}
+ y2warning("Card %d: channel '%s' not found", card_id, channel_name.c_str());
snd_mixer_close(handle);
return YCPBoolean(false);
}
-YCPBoolean alsaSetMute(int card_id, const string& channel, bool value)
+YCPBoolean alsaSetMute(int card_id, const string& channel_name, bool value)
{
INIT_MIXER
+ YastChannelId ch_id(channel_name);
+ std::string channel(ch_id.name());
+ unsigned ch_index = ch_id.index();
+
+ y2debug("Channel Id: '%s' => name: '%s', index: %u", channel_name.c_str(), channel.c_str(), ch_index);
for (elem = snd_mixer_first_elem(handle); elem; elem = snd_mixer_elem_next(elem))
{
snd_mixer_selem_get_id(elem, sid);
if (snd_mixer_selem_id_get_name(sid) == channel
+ && snd_mixer_selem_get_index(elem) == ch_index
&& snd_mixer_selem_is_active(elem)
&& snd_mixer_selem_has_playback_switch(elem))
{
@@ -180,6 +210,8 @@
}
}
+ y2warning("Card %d: channel '%s' not found", card_id, channel_name.c_str());
+
snd_mixer_close(handle);
return YCPBoolean(false);
}
@@ -190,9 +222,10 @@
INIT_MIXER // well, this doesn't look like a c++ code... i'm sorry for that... see definition above
+ y2milestone("Sound card %d: reading channels", card_id);
+
for (elem = snd_mixer_first_elem(handle); elem; elem = snd_mixer_elem_next(elem))
{
- snd_mixer_selem_get_id(elem, sid);
if (!snd_mixer_selem_is_active(elem))
{
continue;
@@ -203,8 +236,12 @@
continue;
}
- outlist->add(YCPString(snd_mixer_selem_id_get_name(sid)));
+ YastChannelId ch_id(snd_mixer_selem_get_name(elem), snd_mixer_selem_get_index(elem));
+
+ y2milestone("Found channel: name: '%s', index: %u, id: '%s'",
+ ch_id.name().c_str(), ch_id.index(), ch_id.asString().c_str());
+ outlist->add(YCPString(ch_id.asString()));
}
snd_mixer_close(handle);
@@ -241,7 +278,7 @@
cmd+=tmp;
}
cmd+=" > /dev/null 2>&1";
- y2debug("executing '%s'", cmd.c_str());
+ y2milestone("executing '%s'", cmd.c_str());
if(system(cmd.c_str())!=-1)
{
return YCPBoolean(true);
@@ -263,7 +300,7 @@
cmd+=tmp;
}
cmd+=" > /dev/null 2>&1";
- y2debug("executing '%s'", cmd.c_str());
+ y2milestone("executing '%s'", cmd.c_str());
if(system(cmd.c_str()))
{
return YCPBoolean(true);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-sound-2.17.14/agent-audio/src/AlsaAudio.h new/yast2-sound-2.18.0/agent-audio/src/AlsaAudio.h
--- old/yast2-sound-2.17.14/agent-audio/src/AlsaAudio.h 2008-12-15 14:04:33.000000000 +0100
+++ new/yast2-sound-2.18.0/agent-audio/src/AlsaAudio.h 2009-01-09 10:13:16.000000000 +0100
@@ -13,7 +13,7 @@
* Authors:
* dan.meszaros
*
- * $Id: AlsaAudio.h 13745 2004-02-02 10:08:23Z jsuchome $
+ * $Id: AlsaAudio.h 54484 2009-01-09 09:13:15Z lslezak $
*
* interface for acces to alsa/oss sound system from ycp script
*/
@@ -22,8 +22,7 @@
#ifndef __ALSAAUDIO
#define __ALSAAUDIO
-#include
-#include
+#include
using std::string;
using std::vector;
@@ -32,29 +31,29 @@
/**
* volume setting
* @param card card id
- * @param channel name eg. "Master"
+ * @param channel_name name eg. "Master"
* @param value volume 0..100
*/
-YCPBoolean alsaSetVolume(int card, const string& channel, int value);
+YCPBoolean alsaSetVolume(int card, const string& channel_name, int value);
/**
* volume reading
* @param card card id
- * @param channel channel name
+ * @param channel_name channel name
*/
-YCPValue alsaGetVolume(int card, const string& channel);
+YCPValue alsaGetVolume(int card, const string& channel_name);
/**
* setMute
* @param card card id
- * @param channel channel name
+ * @param channel_name channel name
* @param value boolean mute/unmute
*/
-YCPBoolean alsaSetMute(int card, const string& channel, bool value);
-YCPValue alsaGetMute(int card, const string& channel);
+YCPBoolean alsaSetMute(int card, const string& channel_name, bool value);
+YCPValue alsaGetMute(int card, const string& channel_name);
/**
* getChannels- list of available channels for card #id
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-sound-2.17.14/agent-audio/src/AudioAgent.h new/yast2-sound-2.18.0/agent-audio/src/AudioAgent.h
--- old/yast2-sound-2.17.14/agent-audio/src/AudioAgent.h 2008-12-15 14:04:33.000000000 +0100
+++ new/yast2-sound-2.18.0/agent-audio/src/AudioAgent.h 2009-01-09 10:13:16.000000000 +0100
@@ -13,7 +13,7 @@
* Authors:
* dan.meszaros
*
- * $Id: AudioAgent.h 13745 2004-02-02 10:08:23Z jsuchome $
+ * $Id: AudioAgent.h 54484 2009-01-09 09:13:15Z lslezak $
*
* interface for acces to alsa/oss sound system from ycp script
*/
@@ -22,7 +22,6 @@
#ifndef __AUDIOAGENT
#define __AUDIOAGENT
-#include
#include
using std::string;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-sound-2.17.14/agent-audio/src/Makefile.am new/yast2-sound-2.18.0/agent-audio/src/Makefile.am
--- old/yast2-sound-2.17.14/agent-audio/src/Makefile.am 2008-12-15 14:04:33.000000000 +0100
+++ new/yast2-sound-2.18.0/agent-audio/src/Makefile.am 2009-01-07 13:40:34.000000000 +0100
@@ -8,6 +8,7 @@
noinst_LTLIBRARIES = liby2ag_audio.la
liby2ag_audio_la_SOURCES = \
+ YastChannelId.cc YastChannelId.h \
OSSAudio.cc OSSAudio.h \
AudioAgent.cc AudioAgent.h \
AlsaAudio.cc AlsaAudio.h
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-sound-2.17.14/agent-audio/src/Makefile.in new/yast2-sound-2.18.0/agent-audio/src/Makefile.in
--- old/yast2-sound-2.17.14/agent-audio/src/Makefile.in 2009-01-09 16:01:58.000000000 +0100
+++ new/yast2-sound-2.18.0/agent-audio/src/Makefile.in 2009-01-13 15:19:53.000000000 +0100
@@ -56,14 +56,16 @@
pluginLTLIBRARIES_INSTALL = $(INSTALL)
LTLIBRARIES = $(noinst_LTLIBRARIES) $(plugin_LTLIBRARIES)
libpy2ag_audio_la_DEPENDENCIES =
-am__objects_1 = OSSAudio.lo AudioAgent.lo AlsaAudio.lo
+am__objects_1 = YastChannelId.lo OSSAudio.lo AudioAgent.lo \
+ AlsaAudio.lo
am_libpy2ag_audio_la_OBJECTS = $(am__objects_1) Y2CCAudio.lo
libpy2ag_audio_la_OBJECTS = $(am_libpy2ag_audio_la_OBJECTS)
libpy2ag_audio_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
$(CXXFLAGS) $(libpy2ag_audio_la_LDFLAGS) $(LDFLAGS) -o $@
liby2ag_audio_la_DEPENDENCIES =
-am_liby2ag_audio_la_OBJECTS = OSSAudio.lo AudioAgent.lo AlsaAudio.lo
+am_liby2ag_audio_la_OBJECTS = YastChannelId.lo OSSAudio.lo \
+ AudioAgent.lo AlsaAudio.lo
liby2ag_audio_la_OBJECTS = $(am_liby2ag_audio_la_OBJECTS)
liby2ag_audio_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
@@ -258,6 +260,7 @@
plugin_LTLIBRARIES = libpy2ag_audio.la
noinst_LTLIBRARIES = liby2ag_audio.la
liby2ag_audio_la_SOURCES = \
+ YastChannelId.cc YastChannelId.h \
OSSAudio.cc OSSAudio.h \
AudioAgent.cc AudioAgent.h \
AlsaAudio.cc AlsaAudio.h
@@ -355,6 +358,7 @@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/AudioAgent.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/OSSAudio.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Y2CCAudio.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/YastChannelId.Plo@am__quote@
.cc.o:
@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-sound-2.17.14/agent-audio/src/OSSAudio.cc new/yast2-sound-2.18.0/agent-audio/src/OSSAudio.cc
--- old/yast2-sound-2.17.14/agent-audio/src/OSSAudio.cc 2008-12-15 14:04:33.000000000 +0100
+++ new/yast2-sound-2.18.0/agent-audio/src/OSSAudio.cc 2009-01-09 10:13:16.000000000 +0100
@@ -4,19 +4,15 @@
*
* Authors: Michal Svec
*
- * $Id: OSSAudio.cc 44988 2008-02-25 13:43:29Z lslezak $
+ * $Id: OSSAudio.cc 54484 2009-01-09 09:13:15Z lslezak $
*/
#include
#include
-#include
#include
-#include
-#include
#include
-#include
-#include
+#include
#include "OSSAudio.h"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-sound-2.17.14/agent-audio/src/OSSAudio.h new/yast2-sound-2.18.0/agent-audio/src/OSSAudio.h
--- old/yast2-sound-2.17.14/agent-audio/src/OSSAudio.h 2008-12-15 14:04:33.000000000 +0100
+++ new/yast2-sound-2.18.0/agent-audio/src/OSSAudio.h 2009-01-09 10:13:16.000000000 +0100
@@ -4,14 +4,13 @@
*
* Authors: Michal Svec
*
- * $Id: OSSAudio.h 13745 2004-02-02 10:08:23Z jsuchome $
+ * $Id: OSSAudio.h 54484 2009-01-09 09:13:15Z lslezak $
*/
#ifndef __OSSAudio_h
#define __OSSAudio_h
-#include
-#include
+#include
extern char *ossChannels[];
extern int ossChannels_num;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-sound-2.17.14/agent-audio/src/YastChannelId.cc new/yast2-sound-2.18.0/agent-audio/src/YastChannelId.cc
--- old/yast2-sound-2.17.14/agent-audio/src/YastChannelId.cc 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-sound-2.18.0/agent-audio/src/YastChannelId.cc 2009-01-09 10:10:56.000000000 +0100
@@ -0,0 +1,141 @@
+/* ------------------------------------------------------------------------------
+ * Copyright (c) 2009 Novell, Inc. All Rights Reserved.
+ *
+ *
+ * This program is free software; you can redistribute it and/or modify it under
+ * the terms of version 2 of the GNU General Public License as published by the
+ * Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, contact Novell, Inc.
+ *
+ * To contact Novell about this file by physical or electronic mail, you may find
+ * current contact information at www.novell.com.
+ * ------------------------------------------------------------------------------
+ */
+
+/*
+ File: $Id:$
+ Author: Ladislav Slezák
+ Summary: Class for converting Alsa channel name to Yast channel ID and vice versea.
+*/
+
+#include "YastChannelId.h"
+
+// ::snprintf
+#include <cstdio>
+// ::atoi
+#include <cstdlib>
+
+// parse "_#<index>#" string
+YastChannelId::YastChannelId(const std::string &yastID)
+{
+ channel_name = yastID;
+ channel_index = 0;
+
+ if (yastID.empty())
+ {
+ return;
+ }
+
+ std::string::const_iterator it = yastID.end();
+
+ std::string::const_iterator number_end_it = yastID.end();
+ std::string::const_iterator number_begin_it = yastID.end();
+
+ --it;
+
+ if (it == yastID.begin())
+ {
+ return;
+ }
+
+ // no channel index appended
+ if (*it != '#')
+ {
+ return;
+ }
+ else
+ {
+ number_end_it = it;
+ --it;
+
+ if (it == yastID.begin())
+ {
+ return;
+ }
+
+ bool digitfound = false;
+
+ for(;it != yastID.begin(); --it)
+ {
+ if (!isdigit(*it))
+ {
+ break;
+ }
+ else
+ {
+ digitfound = true;
+ }
+ }
+
+ if (!digitfound)
+ {
+ // channel name end with # but no valid index is there
+ return;
+ }
+ else
+ {
+ // no name found
+ if (it == yastID.begin())
+ {
+ return;
+ }
+
+ if (*it == '#')
+ {
+ number_begin_it = it;
+ number_begin_it++;
+
+ --it;
+
+ if (it == yastID.begin())
+ {
+ return;
+ }
+
+ if (*it == '_')
+ {
+ channel_name = std::string(yastID.begin(), it);
+
+ std::string channel_index_str(number_begin_it, number_end_it);
+ channel_index = ::atoi(channel_index_str.c_str());
+ }
+ }
+ }
+ }
+}
+
+std::string YastChannelId::asString()
+{
+ if (channel_index == 0)
+ {
+ return channel_name;
+ }
+
+ // add channel index if it's greater than zero
+ std::string ret(channel_name);
+
+ // add index
+ char buffer[16];
+ ::snprintf(buffer, sizeof(buffer), "_#%u#", channel_index);
+
+ ret += buffer;
+
+ return ret;
+}
+
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-sound-2.17.14/agent-audio/src/YastChannelId.h new/yast2-sound-2.18.0/agent-audio/src/YastChannelId.h
--- old/yast2-sound-2.17.14/agent-audio/src/YastChannelId.h 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-sound-2.18.0/agent-audio/src/YastChannelId.h 2009-01-07 13:57:29.000000000 +0100
@@ -0,0 +1,47 @@
+/* ------------------------------------------------------------------------------
+ * Copyright (c) 2009 Novell, Inc. All Rights Reserved.
+ *
+ *
+ * This program is free software; you can redistribute it and/or modify it under
+ * the terms of version 2 of the GNU General Public License as published by the
+ * Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, contact Novell, Inc.
+ *
+ * To contact Novell about this file by physical or electronic mail, you may find
+ * current contact information at www.novell.com.
+ * ------------------------------------------------------------------------------
+ */
+
+/*
+ File: $Id:$
+ Author: Ladislav Slezák
+ Summary: Class for converting Alsa channel name to Yast channel ID and vice versea.
+*/
+
+#include <string>
+
+class YastChannelId
+{
+ public:
+
+ YastChannelId() : channel_name(), channel_index(0) {}
+ YastChannelId(const char* alsa_name, unsigned alsa_index) : channel_name(alsa_name), channel_index(alsa_index) {}
+ YastChannelId(const std::string &YastID);
+
+ std::string name() {return channel_name;}
+ unsigned index() {return channel_index;}
+
+ std::string asString();
+
+ private:
+
+ std::string channel_name;
+ unsigned channel_index;
+};
+
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-sound-2.17.14/configure new/yast2-sound-2.18.0/configure
--- old/yast2-sound-2.17.14/configure 2009-01-09 16:01:55.000000000 +0100
+++ new/yast2-sound-2.18.0/configure 2009-01-13 15:19:50.000000000 +0100
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.63 for yast2-sound 2.17.14.
+# Generated by GNU Autoconf 2.63 for yast2-sound 2.18.0.
#
# Report bugs to http://bugs.opensuse.org/.
#
@@ -745,8 +745,8 @@
# Identity of this package.
PACKAGE_NAME='yast2-sound'
PACKAGE_TARNAME='yast2-sound'
-PACKAGE_VERSION='2.17.14'
-PACKAGE_STRING='yast2-sound 2.17.14'
+PACKAGE_VERSION='2.18.0'
+PACKAGE_STRING='yast2-sound 2.18.0'
PACKAGE_BUGREPORT='http://bugs.opensuse.org/'
ac_unique_file="RPMNAME"
@@ -1532,7 +1532,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-sound 2.17.14 to adapt to many kinds of systems.
+\`configure' configures yast2-sound 2.18.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1603,7 +1603,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of yast2-sound 2.17.14:";;
+ short | recursive ) echo "Configuration of yast2-sound 2.18.0:";;
esac
cat <<\_ACEOF
@@ -1716,7 +1716,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-yast2-sound configure 2.17.14
+yast2-sound configure 2.18.0
generated by GNU Autoconf 2.63
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1730,7 +1730,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-sound $as_me 2.17.14, which was
+It was created by yast2-sound $as_me 2.18.0, which was
generated by GNU Autoconf 2.63. Invocation command line was
$ $0 $@
@@ -2577,7 +2577,7 @@
# Define the identity of the package.
PACKAGE='yast2-sound'
- VERSION='2.17.14'
+ VERSION='2.18.0'
cat >>confdefs.h <<_ACEOF
@@ -2801,7 +2801,7 @@
-VERSION="2.17.14"
+VERSION="2.18.0"
RPMNAME="yast2-sound"
MAINTAINER="Ladislav Slezak "
@@ -17418,7 +17418,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by yast2-sound $as_me 2.17.14, which was
+This file was extended by yast2-sound $as_me 2.18.0, which was
generated by GNU Autoconf 2.63. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -17481,7 +17481,7 @@
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
-yast2-sound config.status 2.17.14
+yast2-sound config.status 2.18.0
configured by $0, generated by GNU Autoconf 2.63,
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-sound-2.17.14/configure.in new/yast2-sound-2.18.0/configure.in
--- old/yast2-sound-2.17.14/configure.in 2009-01-09 16:01:41.000000000 +0100
+++ new/yast2-sound-2.18.0/configure.in 2009-01-13 15:19:36.000000000 +0100
@@ -3,7 +3,7 @@
dnl -- This file is generated by y2autoconf 2.17.6 - DO NOT EDIT! --
dnl (edit configure.in.in instead)
-AC_INIT(yast2-sound, 2.17.14, http://bugs.opensuse.org/, yast2-sound)
+AC_INIT(yast2-sound, 2.18.0, http://bugs.opensuse.org/, yast2-sound)
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.17.14"
+VERSION="2.18.0"
RPMNAME="yast2-sound"
MAINTAINER="Ladislav Slezak "
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-sound-2.17.14/sound/src/complex.ycp new/yast2-sound-2.18.0/sound/src/complex.ycp
--- old/yast2-sound-2.17.14/sound/src/complex.ycp 2008-12-15 14:04:33.000000000 +0100
+++ new/yast2-sound-2.18.0/sound/src/complex.ycp 2008-12-19 15:19:50.000000000 +0100
@@ -16,7 +16,7 @@
* String corrections by Christian Steinruecken , 2001/08/01
*
*
- * $Id: complex.ycp 52467 2008-10-23 14:48:00Z lslezak $
+ * $Id: complex.ycp 54299 2008-12-19 14:19:49Z lslezak $
*
*/
@@ -482,6 +482,7 @@
Wizard::SetNextButton(`next, Label::OKButton());
Wizard::SetAbortButton(`abort, Label::CancelButton());
+ if (!Mode::installation()) Wizard::HideBackButton();
symbol ret = `_dummy;
@@ -609,6 +610,7 @@
} while (!contains([`back, `abort, `next, `add, `edit, `delete, `mixer],ret));
Wizard::RestoreNextButton();
+ if (!Mode::installation()) Wizard::RestoreBackButton();
return $[ "ui": ret ];
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-sound-2.17.14/sound/src/joy_dialog.ycp new/yast2-sound-2.18.0/sound/src/joy_dialog.ycp
--- old/yast2-sound-2.17.14/sound/src/joy_dialog.ycp 2008-12-15 14:04:33.000000000 +0100
+++ new/yast2-sound-2.18.0/sound/src/joy_dialog.ycp 2008-12-19 15:19:50.000000000 +0100
@@ -6,7 +6,7 @@
* Ladislav Slezak
* Jiri Suchomel
*
- * $Id: joy_dialog.ycp 26876 2006-01-09 07:59:05Z lslezak $
+ * $Id: joy_dialog.ycp 54299 2008-12-19 14:19:49Z lslezak $
*/
{
@@ -506,6 +506,7 @@
Wizard::SetContents (caption, contents, helptext, true, true);
Wizard::SetNextButton(`next, nextbutton[button]:Label::NextButton() );
+ if (!Mode::installation()) Wizard::HideBackButton();
symbol s = nil;
do
@@ -582,6 +583,8 @@
Wizard::RestoreNextButton();
}
+ if (!Mode::installation()) Wizard::RestoreBackButton();
+
return s;
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-sound-2.17.14/sound/src/mixer.ycp new/yast2-sound-2.18.0/sound/src/mixer.ycp
--- old/yast2-sound-2.17.14/sound/src/mixer.ycp 2008-12-15 14:04:33.000000000 +0100
+++ new/yast2-sound-2.18.0/sound/src/mixer.ycp 2009-01-09 09:47:06.000000000 +0100
@@ -13,7 +13,7 @@
*
* String corrections by Christian Steinruecken , 2001/08/01
*
- * $Id: mixer.ycp 37758 2007-04-27 10:28:30Z lslezak $
+ * $Id: mixer.ycp 54482 2009-01-09 08:47:06Z lslezak $
*
*/
@@ -101,14 +101,32 @@
* @param spec true-slider false-intfield
* @return term widget
*/
- define term volElement(string label, integer value, boolean spec) ``{
+ define term volElement(string channel_id, integer value, boolean spec)
+ {
+ string label = channel_id;
+
+ // remove the index from the channel ID if it's there
+ if (regexpmatch(channel_id, "^.*_#[0-9]+#$"))
+ {
+ label = regexpsub(channel_id, "^(.*)_#[0-9]+#$", "\\1");
+ string index_str = regexpsub(channel_id, "^.*_#([0-9]+)#$", "\\1");
+ integer index = tointeger(index_str);
+
+ if (index != nil)
+ {
+ // add index + 1 to the channel label
+ // so there are channels "Speaker", "Speaker 2", "Speaker 3", ...
+ label = sformat("%1 %2", label, index + 1);
+ }
+ }
+
if (UI::HasSpecialWidget(`Slider))
{
- return `Slider(`id(label), `opt(`notify), translateChannelName(label), 0, 100, value);
+ return `Slider(`id(channel_id), `opt(`notify), translateChannelName(label), 0, 100, value);
}
else
{
- return `IntField(`id(label), `opt(`notify), translateChannelName(label), 0, 100, value);
+ return `IntField(`id(channel_id), `opt(`notify), translateChannelName(label), 0, 100, value);
}
}
@@ -210,6 +228,8 @@
path pth = topath(sformat(".audio.alsa.cards.%1.channels", card_id));
list channels = [];
string modname = "";
+ // card name
+ string model = Sound::modules_conf[card_id, "model"]:_("Unknown");
if (Sound::use_alsa)
{
@@ -284,8 +304,8 @@
term con = mixerWidget (channels);
- // dialog header
- Wizard::SetContentsButtons (sformat(_("Volume Settings for Card %1"), card_id),
+ // dialog header, %1 = card id (number), %2 = name
+ Wizard::SetContentsButtons (sformat(_("Volume Settings for Card %1 - %2"), card_id, model),
con, help, Label::BackButton(), Label::OKButton() );
any ui = nil; // value can be `next `abort... or string (channel name)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-sound-2.17.14/sound/src/options.ycp new/yast2-sound-2.18.0/sound/src/options.ycp
--- old/yast2-sound-2.17.14/sound/src/options.ycp 2008-12-15 14:04:33.000000000 +0100
+++ new/yast2-sound-2.18.0/sound/src/options.ycp 2008-12-22 11:09:15.000000000 +0100
@@ -16,7 +16,7 @@
* Dan Vesely
* Dan Meszaros
*
- * $Id: options.ycp 34672 2006-11-30 13:55:58Z lslezak $
+ * $Id: options.ycp 54324 2008-12-22 10:09:14Z lslezak $
*
* parameters: 1st: parameter list
*
@@ -30,6 +30,8 @@
import "Wizard";
import "Label";
import "Popup";
+ import "String";
+ import "Report";
include "sound/ui.ycp"; // ReallyAbort
include "sound/routines.ycp"; // get_module_params, restore_mod_params
@@ -308,15 +310,9 @@
{
y2milestone("possible_values: %1", possible_values);
- term yes_button = `PushButton( `id(`ok), `opt(`default, `key_F10), Label::OKButton());
- term no_button = `PushButton( `id(`cancel), `opt (`key_F9), Label::CancelButton());
-
- term button_box = `HBox(
- `HStretch (),
- `HWeight( 1, yes_button),
- `HSpacing(2),
- `HWeight( 1, no_button ),
- `HStretch ()
+ term button_box = `ButtonBox (
+ `PushButton( `id(`ok), `opt(`okButton, `default, `key_F10), Label::OKButton()),
+ `PushButton( `id(`cancel), `opt(`cancelButton, `key_F9), Label::CancelButton())
);
list<term> items = getPossibleValues(possible_values, value);
@@ -339,9 +335,50 @@
UI::OpenDialog(`opt(`decorated), content);
- any ret = UI::UserInput();
- string option_name = new_option ? (string)UI::QueryWidget(`id(`option_name), `Value) : name;
- string option_value = (string)UI::QueryWidget(`id(`option_value), `Value);
+ any ret = nil;
+ string option_name = "";
+ string option_value = "";
+
+ while(true)
+ {
+ ret = UI::UserInput();
+
+ // validate the input
+ option_name = new_option ? (string)UI::QueryWidget(`id(`option_name), `Value) : name;
+ option_value = (string)UI::QueryWidget(`id(`option_value), `Value);
+
+ // do not validate if the Cancel button has been pressed
+ if (ret == `cancel)
+ {
+ break;
+ }
+
+ // all non-ASCII characters from value
+ string extra_chars = deletechars(option_value, String::CGraph());
+
+ if (extra_chars != "")
+ {
+ Report::Error(sformat(_("Value of the option contains invalid\ncharacters '%1'.\n\nEnter a valid value."), extra_chars));
+ UI::SetFocus(`id(`option_value));
+ continue;
+ }
+
+ // check the option name if it's entered by user
+ if (new_option)
+ {
+ // all non-ASCII characters from name
+ extra_chars = deletechars(option_name, String::CGraph());
+
+ if (extra_chars != "")
+ {
+ Report::Error(sformat(_("Name of the option contains invalid\ncharacters '%1'.\n\nEnter a valid name."), extra_chars));
+ UI::SetFocus(`id(`option_name));
+ continue;
+ }
+ }
+
+ break;
+ }
UI::CloseDialog();
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-sound-2.17.14/sound/src/Sound.ycp new/yast2-sound-2.18.0/sound/src/Sound.ycp
--- old/yast2-sound-2.17.14/sound/src/Sound.ycp 2008-12-15 14:04:33.000000000 +0100
+++ new/yast2-sound-2.18.0/sound/src/Sound.ycp 2009-01-08 16:25:57.000000000 +0100
@@ -4,7 +4,7 @@
* Summary: Sound data
* Authors: Ladislav Slezak
*
- * $Id: Sound.ycp 51978 2008-10-08 11:16:31Z lslezak $
+ * $Id: Sound.ycp 54295 2008-12-19 13:14:57Z lslezak $
*/
{
@@ -707,35 +707,6 @@
// sound Read dialog caption:
string caption = _("Initializing Sound Configuration");
- integer steps = 5;
-
- Progress::New( caption, " ", steps, [
- // progress stage
- _("Read card database"),
- // progress stage
- _("Read previously saved configuration"),
- // progress stage
- _("Detect sound cards"),
- // progress stage
- _("Read sysconfig values"),
- // progress stage
- _("Read volume settings"),
- ], [
- // progress step label
- _("Reading card database..."),
- // progress step label
- _("Reading previously saved configuration..."),
- // progress step label
- _("Detecting sound cards..."),
- // progress step label
- _("Reading sysconfig values..."),
- // progress step label
- _("Reading volume settings..."),
- // progress step label
- _("Finished")
- ],
- ""
- );
if (Mode::test())
{
DetectHardware();
@@ -747,44 +718,25 @@
if (interactive && PollAbort ()) return false;
// load cards database
- Progress::NextStage ();
LoadDatabase (interactive);
// load data from /etc/modules.conf
- Progress::NextStage ();
ReadModulesConf();
- if (interactive && PollAbort()) return false;
-
// detect sound cards
- Progress::NextStage ();
DetectHardware();
- if (interactive && PollAbort()) return false;
-
// check old isa cards (bug25285)
if (interactive && detected_cards == [] && modules_conf == [])
DetectOldCards();
-
- if (interactive && PollAbort()) return false;
- // read rc.config values
- Progress::NextStage ();
rc_vars = read_rc_vars ();
- if (interactive && PollAbort()) return false;
-
- // load volume settings
- Progress::NextStage ();
volume_settings = get_vol_settings();
- if (interactive && PollAbort()) return false;
-
// create list of unconfigured cards
UpdateUnconfiguredCards();
- // increase the progress to "finish"
- Progress::NextStage ();
return true;
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-sound-2.17.14/sound/src/ui.ycp new/yast2-sound-2.18.0/sound/src/ui.ycp
--- old/yast2-sound-2.17.14/sound/src/ui.ycp 2008-12-15 14:04:33.000000000 +0100
+++ new/yast2-sound-2.18.0/sound/src/ui.ycp 2008-12-19 14:38:17.000000000 +0100
@@ -1,6 +1,6 @@
/**
*
- * $Id: ui.ycp 24770 2005-08-10 09:05:49Z lslezak $
+ * $Id: ui.ycp 54296 2008-12-19 13:38:16Z lslezak $
*
* File:
* ui.ycp
@@ -30,7 +30,16 @@
* @return boolean yes/no
*/
define boolean ReallyAbort() ``{
- return Popup::ReallyAbort (Sound::Changed() || Joystick::Changed());
+ boolean config_changed = Sound::Changed() || Joystick::Changed();
+ y2milestone("Sound or joystick config changed: %1", config_changed);
+
+ // no change, abort immediately
+ if (!config_changed)
+ {
+ return true;
+ }
+
+ return Popup::ReallyAbort(config_changed);
}
/**
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-sound-2.17.14/sound/src/write_routines.ycp new/yast2-sound-2.18.0/sound/src/write_routines.ycp
--- old/yast2-sound-2.17.14/sound/src/write_routines.ycp 2009-01-09 16:01:35.000000000 +0100
+++ new/yast2-sound-2.18.0/sound/src/write_routines.ycp 2009-01-09 15:57:15.000000000 +0100
@@ -1,6 +1,6 @@
/**
*
- * $Id: write_routines.ycp 54514 2009-01-09 15:01:35Z lslezak $
+ * $Id: write_routines.ycp 54510 2009-01-09 14:57:14Z lslezak $
*
* File:
* write_routines.ycp
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-sound-2.17.14/sound.pot new/yast2-sound-2.18.0/sound.pot
--- old/yast2-sound-2.17.14/sound.pot 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-sound-2.18.0/sound.pot 2008-09-10 10:47:12.000000000 +0200
@@ -0,0 +1,44 @@
+# translation of sound.po to
+# Copyright (C) YEAR SuSE Linux Products GmbH, Nuernberg
+# This file is distributed under the same license as the PACKAGE package.
+#
+# Andrew Spackman , 2008.
+msgid ""
+msgstr ""
+"Project-Id-Version: sound\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2008-08-04 10:30+0200\n"
+"PO-Revision-Date: 2008-08-28 22:05+1200\n"
+"Last-Translator: Andrew Spackman \n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
+
+#: sound/src/sound_write.ycp:117
+#, ycp-format
+msgid ""
+"These required packages are not available: %1\n"
+"Some sound device may not work or some features may not be supported.\n"
+"\n"
+"Enable or add an additional software repository containing the packages."
+msgstr ""
+"These required packages are not available: %1\n"
+"Some sound devices may not work or some features may not be supported.\n"
+"\n"
+"Enable or add an additional software repository containing the packages."
+
+#: sound/src/texts.ycp:275
+msgid ""
+"<p>\n"
+"Use <b>Other</b> to set the volume of the selected card or configure\n"
+"the module loading for playing MIDI files (<b>Start Sequencer</b>).\n"
+"Use <b>Play Test Sound</b> to test the selected card.\n"
+"</p>\n"
+msgstr ""
+"<p>\n"
+"Use <b>Other</b> to set the volume of the selected card or configure\n"
+"the module loaded for playing MIDI files (<b>Start Sequencer</b>).\n"
+"Use <b>Play Test Sound</b> to test the selected card.\n"
+"</p>\n"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-sound-2.17.14/VERSION new/yast2-sound-2.18.0/VERSION
--- old/yast2-sound-2.17.14/VERSION 2009-01-09 15:58:11.000000000 +0100
+++ new/yast2-sound-2.18.0/VERSION 2009-01-13 15:19:10.000000000 +0100
@@ -1 +1 @@
-2.17.14
+2.18.0
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org