kde, language, and openoffice?

2003-12-27 Thread Hadmut Danisch
Hi,

I need to install and configure some debian computers
for non-experienced users with KDE and openoffice. 
Now I have a certain problem:

KDE allows to select the user language for the KDE
session, but does not propagate this in the environment
language. Openoffice allows to set the user language as
well, but does not provide a menu option. Instead it requires
the environment variable LANG set properly. 

Since I do not want to set the variable globally and do 
not want to fiddle with every single account, I'm looking
for a way to propagate the KDE language setting into the
LANG environment variable (once for all users). Any idea
how to do it?

regards
Hadmut



kdenonbeta/kdedebian/kapture

2003-12-27 Thread Peter Rockai
CVS commit by mornfall: 

General:
- update TODO
- cvsignore *ui.h *ui.cpp
libcapture
- introduce capture::PkgManager (first try)
- implement capture::PkgFeeder: This class abstracts the PkgIterator
  away from addPackage in grouper and enables us to feed eg. DepIterator
  into grouper. This needs matching the grouper type and feeder type.
  Ie, there are going to be different types of groupers and feeders,
  with regards to respective IterType (see pkggrouper.h)
- unpointerize argmaps in pkggrouper.*
- add PkgGrouperFactory:: saveToString, loadFromString; saves
  configuration of whole chain into a string and loads it back into
  objects; needed for user-configurable chains
- add PkgCustomGrouper: creates chain from argmap-marshalled
  PkgFactoryChain; usefulness of this is questionable right now (as
  PkgGrouperFactory gained save/load to/from string); will see
- add stl_util.{h,cpp}: marshallers and demarshallers (ugly, fragile,
  sucky) for list and argmap (aka map); needed
  for saving PkgGrouperFactory into string
- stab at PkgDepTree (will be obsoleted by PkgDepFeeder anyway)
- add some comments to few classes
kapture:
- add Dominique to authors list
- create kapture::MainView: TabWidget contianer grouping different
  package views and the OperationMenu; should be capable of
  adding/removing its views and also saving and loading them to
  a KConfig (this isn't implemented yet however)
- create kapture::OperationMenu: simple menu to perform the most common
  tasks (mock-up for now -- no functionality implemented yet)
- move the version combobox in PkgDetailsCommon upwards, next to package
  name and highlight both Package and Version
- create generic PkgView (abstract, defines interface for PkgView's to
  be used in MainView) and PkgListView implementation for this
- first stab at KConfig, kconfig_compiler, KConfigSkeleton and friends;
  not functional right now, mostly skeletons

Domi: Sorry for big commit... Also, this is full of warnings and maybe
broken code... I will clean up myself, don't bother. I hope i will be
able to commit today...

CCMAIL: [EMAIL PROTECTED]


  Akapture/kaptureconfig.cpp   1.1 [no copyright]
  Akapture/kaptureconfig.h   1.1 [UNKNOWN]
  Akapture/kaptureconfigbase.kcfgc   1.1
  Akapture/mainview.cpp   1.1 [no copyright]
  Akapture/mainview.h   1.1 [UNKNOWN]
  Akapture/mainviewui.ui   1.1
  Akapture/operationmenu.h   1.1 [UNKNOWN]
  Akapture/operationmenuui.ui   1.1
  Akapture/pkglistview.cpp   1.1 [no copyright]
  Akapture/pkglistview.h   1.1 [UNKNOWN]
  Akapture/pkglistviewui.ui   1.1
  Akapture/pkgmanager.cpp   1.1 [LGPL (v2+)]
  Akapture/pkgmanager.h   1.1 [LGPL (v2+)]
  Akapture/stl_test.cpp   1.1 [no copyright]
  Akapture/stl_util.cpp   1.1 [LGPL (v2+)]
  Akapture/stl_util.h   1.1 [LGPL (v2+)]
  M +2 -1  TODO   1.3
  M +2 -4  kapture/.cvsignore   1.2
  M +12 -5 kapture/Makefile.am   1.3
  M +30 -46kapture/kapture_part.cpp   1.5
  M +8 -8  kapture/kapture_part.h   1.2
  M +2 -1  kapture/main.cpp   1.2
  M +9 -3  kapture/pkgdetails.cpp   1.3
  M +5 -3  kapture/pkgdetails.h   1.3
  M +125 -75   kapture/pkgdetailscommonui.ui   1.3
  M +127 -26   kapture/pkggrouper.cpp   1.9
  M +81 -22kapture/pkggrouper.h   1.10
  M +6 -4  kapture/pkglist.cpp   1.8
  M +4 -3  kapture/pkglist.h   1.6
  M +28 -9 kapture/pkgtree.cpp   1.7
  M +16 -8 kapture/pkgtree.h   1.4
  M +11 -0 kapture/pkgtreeitem.h   1.7
  M +6 -2  kapture/pkgtreenode.h   1.9
  M +5 -17 kapture/pkgview.cpp   1.6
  M +12 -9 kapture/pkgview.h   1.3





Re: kde, language, and openoffice?

2003-12-27 Thread Adeodato Simó
* Hadmut Danisch [Sat, 27 Dec 2003 10:54:05 +0100]:

> Since I do not want to set the variable globally and do 
> not want to fiddle with every single account, I'm looking
> for a way to propagate the KDE language setting into the
> LANG environment variable (once for all users). Any idea
> how to do it?

KDE stores its language settings in ~/.kde/share/config/kdeglobals, so I
think this may be a good start point. I would suggest something like:

KDEGLOBALS=$HOME/.kde/share/config/kdeglobals
if test -r $KDEGLOBALS; then
LANG=`awk -F= '/^Language=/ {print $2}' $KDEGLOBALS`
export LANG
fi

or something similar in /etc/X11/Xsession.d/91setlang and/or /etc/profile.

Not tested, no warranty, blah blah blah, but HTH.

-- 
Adeodato Simó (a.k.a. thibaut)
EM: asp16 [ykwim] alu.ua.es | IM: my_dato [jabber.org] | PK: DA6AE621
 
One way to make your old car run better is to look up the price of a new model.


signature.asc
Description: Digital signature


kdenonbeta/kdedebian/kapture/kapture

2003-12-27 Thread Dominique Devriese
CVS commit by domi: 

oops, this should have been LGPL.


  M +11 -11pkgtreefactory.h   1.2


--- kdenonbeta/kdedebian/kapture/kapture/pkgtreefactory.h  #1.1:1.2
@@ -3,18 +3,18 @@
 // Copyright (C)  2003  Dominique Devriese <[EMAIL PROTECTED]>
 
-// 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 the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
 
-// This program is distributed in the hope that it will be useful,
+// This library 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.
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
 
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-// 02111-1307, USA.
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+// 02111-1307  USA
 
 namespace capture {




Re: kde, language, and openoffice?

2003-12-27 Thread Alejandro Exojo
El Sábado, 27 de Diciembre de 2003 10:54, Hadmut Danisch escribió:
> I need to install and configure some debian computers
> for non-experienced users with KDE and openoffice.
> Now I have a certain problem:
>
> KDE allows to select the user language for the KDE
> session, but does not propagate this in the environment
> language. Openoffice allows to set the user language as
> well, but does not provide a menu option. Instead it requires
> the environment variable LANG set properly.
>
> Since I do not want to set the variable globally and do
> not want to fiddle with every single account, I'm looking
> for a way to propagate the KDE language setting into the
> LANG environment variable (once for all users). Any idea
> how to do it?

Please, note that debian-qt-kde is a list for _development_ issues. If you 
have problems or doubts with the use of KDE, try debian-kde or debian-user, 
please.

I'm crossposting to debian-kde, because this is a more accurate place.

I'm not sure about the solution of your problem, but I suggest to look at 
/etc/environment, and execute dpkg-reconfigure locales.

Best regards.

-- 
Alex (a.k.a. suy) - GPG ID 0xAA8D2A01
http://lacurva.net/ - Jabber ID: [EMAIL PROTECTED]
Kiss your keyboard goodbye!



kdenonbeta/kdedebian/kapture/kapture

2003-12-27 Thread Dominique Devriese
CVS commit by domi: 

found a bug: when escaping a val ending in "::", you got wrong results with 
explode


  M +14 -1 stl_util.cpp   1.3


--- kdenonbeta/kdedebian/kapture/kapture/stl_util.cpp  #1.2:1.3
@@ -20,4 +20,8 @@
 
 #include 
+#ifdef DOMI_DEBUG
+#include 
+#include 
+#endif
 
 #include "stl_util.h"
@@ -67,5 +71,5 @@ list capture::explode (string s,
 //cerr << "orig: " << s . substr (0, pos) << endl;
 //cerr << "unesc: " << unescape (s . substr (0, pos), delim) << 
endl;
-} else minpos = pos + 1;
+} else minpos = pos + delim.length();
 //cerr << "pos = " << pos << ", minpos = " << minpos << endl;
 }
@@ -128,2 +132,11 @@ argmap capture::string2argmap (string s)
 return res;
 }
+
+#ifdef DOMI_DEBUG
+int main() {
+string test = "appels@::met@frieten!!@@";
+list ret = explode( test, "::" );
+std::copy( ret.begin(), ret.end(), std::ostream_iterator( 
cout, "\n" ) );
+return 0;
+}
+#endif




kdenonbeta/kdedebian/kapture/kapture

2003-12-27 Thread Peter Rockai
CVS commit by mornfall: 

reduce compiler warnings


  M +1 -1  kapture_part.cpp   1.6
  M +4 -2  mainview.cpp   1.2
  M +4 -2  pkggrouper.h   1.11
  M +1 -4  stl_util.cpp   1.2


--- kdenonbeta/kdedebian/kapture/kapture/kapture_part.cpp  #1.5:1.6
@@ -69,5 +69,5 @@ kapturePart::~kapturePart()
 }
 
-void kapturePart::setReadWrite(bool rw)
+void kapturePart::setReadWrite(bool)
 {
 // XXX: needs fixing

--- kdenonbeta/kdedebian/kapture/kapture/mainview.cpp  #1.1:1.2
@@ -48,6 +48,7 @@ void MainView::showPackage (pkgCache::Pk
 }
 
-void MainView::createView (Config *cfg)
+void MainView::createView (Config *)
 {
+// XXX
 /* PkgView *v = new PkgListView (this, cfg -> title ());
 addView (v); */
@@ -61,6 +62,7 @@ void MainView::addView (PkgView *view)
 }
 
-void MainView::removeView (PkgView *view)
+void MainView::removeView (PkgView *)
 {
+// XXX
 }
 

--- kdenonbeta/kdedebian/kapture/kapture/pkggrouper.h  #1.10:1.11
@@ -72,6 +72,8 @@ namespace capture {
 void setPackage (pkgCache::PkgIterator pkg)
 { m_pkg = pkg; };
-virtual pkgCache::VerIterator getVersion (bool) {};
-virtual pkgCache::DepIterator getDepend (bool) {};
+virtual pkgCache::VerIterator getVersion (bool)
+{ return pkgCache::VerIterator (); };
+virtual pkgCache::DepIterator getDepend (bool)
+{ return pkgCache::DepIterator (); };
 virtual IterType iterType () { return IterPackage; };
 };

--- kdenonbeta/kdedebian/kapture/kapture/stl_util.cpp  #1.1:1.2
@@ -25,4 +25,5 @@
 using namespace std;
 using namespace capture;
+// XXX: escaping @?
 
 static string unescape (string s, string delim)
@@ -102,8 +103,4 @@ string capture::join (list l, st
 }
 
-static string argmap2string_escape (string s);
-static string argmap2string_unescape (string s);
-
-// XXX: Nested argmaps!
 string capture::argmap2string (argmap a)
 {




kdenonbeta/kdedebian/kapture/kapture

2003-12-27 Thread Peter Rockai
CVS commit by mornfall: 

try fix compile on 3.1


  M +1 -2  Makefile.am   1.4
  M +2 -0  kaptureconfig.h   1.2
  M +2 -0  mainview.cpp   1.3
  M +1 -1  mainview.h   1.2


--- kdenonbeta/kdedebian/kapture/kapture/Makefile.am  #1.3:1.4
@@ -58,6 +58,5 @@
 libkapturepart_la_SOURCES = kapture_part.cpp pkglistview.cpp pkglistviewui.ui \
 pkglist.cpp pkgview.cpp pkgdetailscommonui.ui pkgdetails.cpp \
-pkgdetailscommon.cpp mainviewui.ui mainview.cpp operationmenuui.ui \
-kaptureconfigbase.kcfgc kaptureconfig.cpp
+pkgdetailscommon.cpp mainviewui.ui mainview.cpp operationmenuui.ui
 
 libkapturepart_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries)

--- kdenonbeta/kdedebian/kapture/kapture/kaptureconfig.h  #1.1:1.2
@@ -10,4 +10,5 @@
 #  define KAPTURECONFIG_H
 
+#if 0
 #include "kaptureconfigbase.h"
 
@@ -27,4 +28,5 @@ namespace kapture {
 };
 }
+#endif
 
 #endif /* ifndef KAPTURECONFIG_H */

--- kdenonbeta/kdedebian/kapture/kapture/mainview.cpp  #1.2:1.3
@@ -48,4 +48,5 @@ void MainView::showPackage (pkgCache::Pk
 }
 
+#if 0
 void MainView::createView (Config *)
 {
@@ -54,4 +55,5 @@ void MainView::createView (Config *)
 addView (v); */
 }
+#endif
 
 void MainView::addView (PkgView *view)

--- kdenonbeta/kdedebian/kapture/kapture/mainview.h  #1.1:1.2
@@ -34,5 +34,5 @@ namespace kapture {
 public:
 MainView (QWidget *parent = 0, const char *name = 0);
-void createView (kapture::Config *cfg);
+// XXX(3.1) void createView (kapture::Config *cfg);
 public slots: // consider making some of these ordinary methods!
 void addView (PkgView *view);




kdenonbeta/kdedebian/kapture/kapture

2003-12-27 Thread Dominique Devriese
CVS commit by domi: 

properly escape and unescape everything in the serialization and 
deserialization processes.  Fix a few bugs as well


  M +87 -15stl_util.cpp   1.4





kdenonbeta/kdedebian/kapture/kapture

2003-12-27 Thread Dominique Devriese
CVS commit by domi: 

proper unit tests for the stl_util stuff


  M +36 -21stl_test.cpp   1.2
  M +0 -42 stl_util.cpp   1.5


--- kdenonbeta/kdedebian/kapture/kapture/stl_test.cpp  #1.1:1.2
@@ -1,29 +1,44 @@
 #include "stl_util.h"
 #include 
+#include 
 
 using namespace std;
 using namespace capture;
 
-int main ()
-{
+int main() {
+{
+argmap test;
+test["test1"] = "test2";
+test["fjioj @,,ping"] = "jfdiosqj @@,,";
+test[",,"] = "#@@@";
+string out = argmap2string( test );
+argmap test2 = string2argmap( out );
+assert( test2.size() == 3 );
+assert( test2["test1"] == "test2" );
+assert( test2["fjioj @,,ping"] == "jfdiosqj @@,," );
+assert( test2[",,"] == "#@@@" );
+}
+{
 list  test;
 test . push_back (string ("test, #1"));
 test . push_back (string ("test, #2"));
-test . push_back (join (test, ","));
-cout << join (test, ",") << endl;
-test = explode (join (test, ","), ",");
-for (list::iterator it = test . begin (); it != test . end (); it 
++)
-cout << *it << endl;
-cout << "---" << endl;
-test . push_back (join (test, ","));
+string joinedf2 = join( test, "," );
+test . push_back ( joinedf2 );
+list testret = explode (join (test, ","), ",");
+assert( test.size() == testret.size() );
+list::iterator i, j;
+i = test.begin();
+j = testret.begin();
+for ( ; i != test.end(); ++i, ++j )
+  assert( *i == *j );
+
+string joinedf3 = join( test, "," );
+test.push_back( joinedf3 );
 string str = join (test, "::");
-cout << str << endl;
-test = explode (str, "::");
-for (list::iterator it = test . begin (); it != test . end (); it 
++) {
-cout << *it << "( ";
-list test1 = explode (*it, ",");
-for (list::iterator jt = test1 . begin (); jt != test1 . end 
(); jt ++)
-cout << "'" << (*jt) << "' ";
-cout << ")" << endl;
+testret = explode (str, "::");
+i = test.begin();
+j = testret.begin();
+for ( ; i != test.end(); ++i, ++j )
+  assert( *i == *j );
 }
 return 0;

--- kdenonbeta/kdedebian/kapture/kapture/stl_util.cpp  #1.4:1.5
@@ -20,8 +20,4 @@
 
 #include 
-#ifdef DOMI_DEBUG
-#include 
-#include 
-#endif
 
 #include "stl_util.h"
@@ -133,16 +129,4 @@ list capture::explode (string s,
 }
 
-static string join_helper (list l, string delim)
-{
-string res;
-for (list::iterator it = l . begin (), next; it != l . end (); it 
++) {
-res . append (*it);
-next = it; next ++;
-if (next != l . end ())
-res . append (delim);
-}
-return res;
-}
-
 string capture::join (list l, string delim)
 {
@@ -187,28 +171,2 @@ argmap capture::string2argmap (string s)
 return res;
 }
-
-#ifdef DOMI_DEBUG
-int main() {
-{
-string test = "appels@::met@frieten!!@@";
-cout << escape( test, "::" ) << endl;
-cout << unescape( escape( test, "::" ), "::" ) << endl;
-}
-cout << endl;
-{
-argmap test;
-test["test1"] = "test2";
-test["fjioj @,,ping"] = "jfdiosqj @@,,";
-test[",,"] = "#@@@";
-string out = argmap2string( test );
-cout << out << endl;
-argmap test2 = string2argmap( out );
-cout << test2.size() << endl;
-cout << test2["test1"] << endl;
-cout << test2["fjioj @,,ping"] << endl;
-cout << test2[",,"] << endl;
-}
-cout << endl;
-return 0;
-}
-#endif




kdenonbeta/kdedebian/kapture/kapture

2003-12-27 Thread Dominique Devriese
CVS commit by domi: 

cvs ignore stl_test


  M +1 -0  .cvsignore   1.3


--- kdenonbeta/kdedebian/kapture/kapture/.cvsignore  #1.2:1.3
@@ -4,2 +4,3 @@
 Makefile
 Makefile.in
+stl_test




kdenonbeta/kdedebian/kapture/kapture

2003-12-27 Thread Dominique Devriese
CVS commit by domi: 

constant references rock.

Peter: copying std::map's around is a pretty heavy operation, don't do
it unless necessary.

CCMAIL: Peter Rockai <[EMAIL PROTECTED]>


  M +9 -9  pkggrouper.cpp   1.10
  M +11 -11pkggrouper.h   1.12