Bug 80115 - Can't define shortcuts for actions when using i18n
Summary: Can't define shortcuts for actions when using i18n
Status: RESOLVED FIXED
Alias: None
Product: quanta
Classification: Unmaintained
Component: general (show other bugs)
Version: 3.2.1
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: András Manţia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-04-22 12:03 UTC by Markus Pohl
Modified: 2004-04-22 14:28 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Pohl 2004-04-22 12:03:07 UTC
Version:           3.2.1 (using KDE KDE 3.2.1)
Installed from:    Debian testing/unstable Packages
OS:          Linux

When defining a keyboard shortcut for an action while using another language than English (Standard), keyboard shortcuts are saved wrongly. For example, defining "CTRL+ALT+X", "Strg+Alt+X" is displayed with German i18n.

In the actions.rc, the localized string "Strg+Alt+X" is saved instead of "CTRL+ALT+X". Because this string is invalid, "none" is displayed as the shortcut when redisplaying the action item in the dialog.

As a workaround, the actions.rc can be edited and the correct shortcut description be entered.
Comment 1 András Manţia 2004-04-22 14:28:30 UTC
CVS commit by amantia: 

Don't save the localized shortcut text in the actions.rc.

CCMAIL: 80115-done@bugs.kde.org


  M +5 -0      ChangeLog   1.251
  M +7 -4      dialogs/actionconfigdialog.cpp   1.33
  M +1 -0      dialogs/actionconfigdialog.h   1.7
  M +2 -1      dialogs/actionconfigdialogs.ui   1.13
  M +1 -1      src/viewmanager.cpp   1.38


--- kdewebdev/quanta/ChangeLog  #1.250:1.251
@@ -25,4 +25,9 @@
         - fix restoration of the toolbar visibility setting [#79082]
         - hide/show the plugin toolbar as well when Show Toolbar is unchecked/checked [#79082]
+        - don't ask for copying a file to the project if it is under the project directory (happened
+          with symlinked files and projects)
+        - color with bold in the Files Tree the opened files, even if they are under a symlinked
+          directory
+        - don't save the shortcuts as localized strings [#80115]
 
     - performance:

--- kdewebdev/quanta/dialogs/actionconfigdialog.cpp  #1.32:1.33
@@ -294,4 +294,5 @@ void ActionConfigDialog::slotSelectionCh
       lineText->setText(actionText);
       lineToolTip->setText( el.attribute("tooltip") );
+      selectedShortcut = action->shortcut();
       QString shortcutText = action->shortcut().toString();
       if (shortcutText.isEmpty())
@@ -461,8 +462,8 @@ void ActionConfigDialog::saveCurrentActi
   if (customShortcut->isChecked())
   {
-    s = shortcutKeyButton->text();
+    s = selectedShortcut.toString();
   }
   el.setAttribute("shortcut", s);
-  currentAction->setShortcut(KShortcut(s));
+  currentAction->setShortcut(selectedShortcut);
 
 //update the tree view
@@ -698,10 +699,10 @@ void ActionConfigDialog::slotShortcutCap
         {
           KAction *action = ac->action(i);
-          if (action->shortcut().toString().contains(shortcutText))
+          if (action != currentAction && action->shortcut().toString().contains(shortcutText))
           {
             global = action->text();
             break;
           }
-          if (!shortcutText2.isEmpty() && action->shortcut().toString().contains(shortcutText))
+          if (!shortcutText2.isEmpty() && action != currentAction &&  action->shortcut().toString().contains(shortcutText))
           {
             shortcutText = shortcutText2;
@@ -719,4 +720,5 @@ void ActionConfigDialog::slotShortcutCap
     shortcutKeyButton->setText(shortcutText);
     buttonApply->setEnabled(true);
+    selectedShortcut = shortcut;
   } else
   {
@@ -752,4 +754,5 @@ void ActionConfigDialog::slotNewAction()
 
   currentAction = new TagAction(&el, quantaApp->actionCollection());
+  selectedShortcut = KShortcut();
   static_cast<TagAction*>(currentAction)->setModified(true);
   QListViewItem *currentItem = actionTreeView->currentItem();

--- kdewebdev/quanta/dialogs/actionconfigdialog.h  #1.6:1.7
@@ -59,4 +59,5 @@ private:
   QListViewItem *allActionsItem;
   QMap<QString, QString> globalShortcuts;
+  KShortcut selectedShortcut;
 };
 

--- kdewebdev/quanta/dialogs/actionconfigdialogs.ui  #1.12:1.13
@@ -46,5 +46,5 @@
                         <cstring>unnamed</cstring>
                     </property>
-                    <widget class="QPushButton" row="2" column="3">
+                    <widget class="KPushButton" row="2" column="3">
                         <property name="name">
                             <cstring>deleteAction</cstring>
@@ -972,4 +972,5 @@
 <includes>
     <include location="global" impldecl="in implementation">kkeybutton.h</include>
+    <include location="global" impldecl="in implementation">kpushbutton.h</include>
 </includes>
 <slots>