[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdebase/kcontrol/keys
From:       Aaron J. Seigo <aseigo () olympusproject ! org>
Date:       2003-06-04 22:51:13
[Download RAW message or body]

CVS commit by aseigo: 

allow setting of command shortcuts in the keys control centre.
this is the #1 user support request on IRC these days, and EVERY single
user checked the keyboard shortcuts dialog on their own but NONE thought
to check the menu editor (which makes sense). menu editting is still done
via the menu editor (and there is both explanatory text and a link to the
menu editor so people can figure this out).


  A            commandShortcuts.cpp   1.1
  A            commandShortcuts.h   1.1
  A            khotkeys.cpp   1.1
  A            khotkeys.h   1.1
  A            treeview.cpp   1.1
  A            treeview.h   1.1
  M +2 -2      Makefile.am   1.42
  M +14 -10    main.cpp   1.50
  M +2 -0      main.h   1.10


--- kdebase/kcontrol/keys/Makefile.am  #1.41:1.42
@@ -1,6 +1,6 @@
 kde_module_LTLIBRARIES = kcm_keys.la
 
-kcm_keys_la_SOURCES =  shortcuts.cpp modifiers.cpp main.cpp
-kcm_keys_la_LIBADD   = -lkdeui
+kcm_keys_la_SOURCES =  shortcuts.cpp modifiers.cpp main.cpp khotkeys.cpp \
treeview.cpp commandShortcuts.cpp +kcm_keys_la_LIBADD   = -lkdeui -lkio
 kcm_keys_la_LDFLAGS  = $(all_libraries) -module -avoid-version -no-undefined
 

--- kdebase/kcontrol/keys/main.cpp  #1.49:1.50
@@ -22,4 +22,5 @@
  */
 
+#include "commandShortcuts.h"
 #include "main.h"
 #include "modifiers.h"
@@ -62,4 +63,9 @@ void KeyModule::initGUI()
         connect( m_pShortcuts, SIGNAL(changed(bool)), SLOT(slotModuleChanged(bool)) \
);  
+        m_pCommandShortcuts = new CommandShortcutsModule ( this );
+        m_pTab->addTab( m_pCommandShortcuts, i18n("Command Shortcuts") );
+        connect( m_pCommandShortcuts, SIGNAL(changed(bool)), \
SLOT(slotModuleChanged(bool)) ); +    connect( m_pTab, \
SIGNAL(currentChanged(QWidget*)), m_pCommandShortcuts, SLOT(showing(QWidget*)) ); +
         m_pModifiers = new ModifiersModule( this );
         m_pTab->addTab( m_pModifiers, i18n("Modifier Keys") );
@@ -71,6 +77,6 @@ void KeyModule::load()
 {
         kdDebug(125) << "KeyModule::load()" << endl;
-        if( m_pTab->currentPageIndex() == 0 )
                 m_pShortcuts->load();
+        m_pCommandShortcuts->load();
 }
 
@@ -79,8 +85,7 @@ void KeyModule::save()
 {
         kdDebug(125) << "KeyModule::save()" << endl;
-        switch( m_pTab->currentPageIndex() ) {
-                case 0: m_pShortcuts->save(); break;
-                case 1: m_pModifiers->save(); break;
-        }
+        m_pShortcuts->save();
+        m_pCommandShortcuts->save();
+        m_pModifiers->save();
 }
 
@@ -88,8 +93,7 @@ void KeyModule::defaults()
 {
         kdDebug(125) << "KeyModule::defaults()" << endl;
-        switch( m_pTab->currentPageIndex() ) {
-                case 0: m_pShortcuts->defaults(); break;
-                case 1: m_pModifiers->defaults(); break;
-        }
+        m_pShortcuts->defaults();
+        m_pCommandShortcuts->defaults();
+        m_pModifiers->defaults();
 }
 

--- kdebase/kcontrol/keys/main.h  #1.9:1.10
@@ -28,4 +28,5 @@
 #include <kcmodule.h>
 
+class CommandShortcutsModule;
 class ShortcutsModule;
 class ModifiersModule;
@@ -51,4 +52,5 @@ class KeyModule : public KCModule
  private:
         QTabWidget* m_pTab;
+        CommandShortcutsModule* m_pCommandShortcuts;
         ShortcutsModule* m_pShortcuts;
         ModifiersModule* m_pModifiers;


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic