Bug 123772 - Impossible to change some RDP default values (number of colors, keyboard layout)
Summary: Impossible to change some RDP default values (number of colors, keyboard layout)
Status: RESOLVED FIXED
Alias: None
Product: krdc
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Debian testing Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: Jaison Lee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-17 09:21 UTC by Philippe Cloutier
Modified: 2006-07-27 22:24 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philippe Cloutier 2006-03-17 09:21:55 UTC
Version:            (using KDE KDE 3.5.1)
Installed from:    Debian testing/unstable Packages
OS:                Linux

In krdc's preferences, Default RDP values tab, it is not possible to save changes on 2 values: the number of colors (always gets back to 8 bits) and the keyboard layout (always comes back to en-us).

To reproduce, using as example the keyboard layout:

1. $ krdc
2. Preferences
3. Default RDP values tab
4. Change en-us to, say, fr
5. OK
6. Repeat 2. and 3.

You should now see that keyboard layout is back to en-us. If you can't reproduce this at first try, you can ask me for a followup, as this should be 100% reproducible.

There appears to be a little difference between the 2 problems. After step 5, krdcrc has the new value for keyboard layout. But, if you change the number of colors, krdcrc is not changed.

I can reproduce this on Etch using KDE 3.5.1, and on Debian 3.1 (using KDE 3.3.2). This was originally reported by Andrew Schulman against Etch's KDE 3.4.1 as Debian #314223.
Comment 1 Jaison Lee 2006-03-17 15:23:15 UTC
Standard disclaimer: KRDC is currently unmaintained, and so long as it remains so its future is uncertain. 
 
Comment 2 Andreas Kling 2006-07-18 22:17:11 UTC
SVN commit 563911 by kling:

Remember new default settings for RDP color depth and keyboard layout.

BUG: 123772


 M  +4 -1      preferencesdialog.cpp  
 M  +1 -1      rdp/rdphostpref.h  
 M  +1 -0      rdp/rdpprefs.ui.h  


--- branches/KDE/3.5/kdenetwork/krdc/preferencesdialog.cpp #563910:563911
@@ -73,6 +73,8 @@
   m_rdpPrefs->setRdpHeight( m_rdpDefaults->height() );
   m_rdpPrefs->setShowPrefs( m_rdpDefaults->askOnConnect() );
   m_rdpPrefs->setUseKWallet( m_rdpDefaults->useKWallet() );
+  m_rdpPrefs->setColorDepth( m_rdpDefaults->colorDepth() );
+  m_rdpPrefs->setKbLayout( keymap2int( m_rdpDefaults->layout() ));
   m_rdpPrefs->setResolution();
 }
 
@@ -86,9 +88,10 @@
 
   m_rdpDefaults->setWidth( m_rdpPrefs->rdpWidth() );
   m_rdpDefaults->setHeight( m_rdpPrefs->rdpHeight() );
-  m_rdpDefaults->setLayout( rdpKeymaps[ m_rdpPrefs->kbLayout() ] );
+  m_rdpDefaults->setLayout( int2keymap( m_rdpPrefs->kbLayout() ));
   m_rdpDefaults->setAskOnConnect( m_rdpPrefs->showPrefs() );
   m_rdpDefaults->setUseKWallet( m_rdpPrefs->useKWallet() );
+  m_rdpDefaults->setColorDepth( m_rdpPrefs->colorDepth() );
 
   HostPreferences *hp = HostPreferences::instance();
   hp->sync();
--- branches/KDE/3.5/kdenetwork/krdc/rdp/rdphostpref.h #563910:563911
@@ -50,7 +50,7 @@
 static const int rdpNumKeymaps = 25;
 static const int rdpDefaultKeymap = 4; // en-us
 
-inline int keymap2int(QString &keymap)
+inline int keymap2int(const QString &keymap)
 {
 	int layout;
 	for(layout = 0; layout < rdpNumKeymaps; layout++)
--- branches/KDE/3.5/kdenetwork/krdc/rdp/rdpprefs.ui.h #563910:563911
@@ -119,6 +119,7 @@
   {
     cmbResolution->setCurrentItem(3);
   }
+  resolutionChanged( cmbResolution->currentItem() );
 }
 
 
Comment 3 Andrew Schulman 2006-07-19 00:39:36 UTC
>            What    |Removed                     |Added
> ------------------------------------------------------------------------ 
>              Status|NEW                         |RESOLVED 
>          Resolution|                            |FIXED


Thank you!
Comment 4 Andreas Kling 2006-07-27 22:24:42 UTC
SVN commit 567027 by kling:

Forward-port SVN commit 563911 by kling: 
 
Remember new default settings for RDP color depth and keyboard layout. 
   
CCBUG: 123772


 M  +4 -1      preferencesdialog.cpp  
 M  +1 -1      rdp/rdphostpref.h  
 M  +1 -0      rdp/rdpprefs.ui.h  


--- trunk/KDE/kdenetwork/krdc/preferencesdialog.cpp #567026:567027
@@ -82,6 +82,8 @@
   m_rdpPrefs->setRdpHeight( m_rdpDefaults->height() );
   m_rdpPrefs->setShowPrefs( m_rdpDefaults->askOnConnect() );
   m_rdpPrefs->setUseKWallet( m_rdpDefaults->useKWallet() );
+  m_rdpPrefs->setColorDepth( m_rdpDefaults->colorDepth() );
+  m_rdpPrefs->setKbLayout( keymap2int( m_rdpDefaults->layout() ));
   m_rdpPrefs->setResolution();
 }
 
@@ -95,9 +97,10 @@
 
   m_rdpDefaults->setWidth( m_rdpPrefs->rdpWidth() );
   m_rdpDefaults->setHeight( m_rdpPrefs->rdpHeight() );
-  m_rdpDefaults->setLayout( rdpKeymaps[ m_rdpPrefs->kbLayout() ] );
+  m_rdpDefaults->setLayout( int2keymap( m_rdpPrefs->kbLayout() ));
   m_rdpDefaults->setAskOnConnect( m_rdpPrefs->showPrefs() );
   m_rdpDefaults->setUseKWallet( m_rdpPrefs->useKWallet() );
+  m_rdpDefaults->setColorDepth( m_rdpPrefs->colorDepth() );
 
   HostPreferences *hp = HostPreferences::instance();
   hp->sync();
--- trunk/KDE/kdenetwork/krdc/rdp/rdphostpref.h #567026:567027
@@ -58,7 +58,7 @@
 static const int rdpNumKeymaps = 34;
 static const int rdpDefaultKeymap = 8; // en-us
 
-inline int keymap2int(QString &keymap)
+inline int keymap2int(const QString &keymap)
 {
 	int layout;
 	for(layout = 0; layout < rdpNumKeymaps; layout++)
--- trunk/KDE/kdenetwork/krdc/rdp/rdpprefs.ui.h #567026:567027
@@ -138,6 +138,7 @@
   {
     cmbResolution->setCurrentItem(5);
   }
+  resolutionChanged( cmbResolution->currentItem() );
 }