diff options
Diffstat (limited to 'khotkeys')
-rw-r--r-- | khotkeys/CMakeL10n.txt | 6 | ||||
-rw-r--r-- | khotkeys/app/CMakeLists.txt | 8 | ||||
-rw-r--r-- | khotkeys/app/app.cpp | 111 | ||||
-rw-r--r-- | khotkeys/app/kded.cpp | 30 | ||||
-rw-r--r-- | khotkeys/app/kded.h | 8 | ||||
-rw-r--r-- | khotkeys/app/khotkeys.desktop | 13 | ||||
-rw-r--r-- | khotkeys/data/trinity2b1.khotkeys | 1 | ||||
-rw-r--r-- | khotkeys/kcontrol/CMakeL10n.txt | 7 | ||||
-rw-r--r-- | khotkeys/kcontrol/CMakeLists.txt | 9 | ||||
-rw-r--r-- | khotkeys/kcontrol/Makefile.am | 7 | ||||
-rw-r--r-- | khotkeys/kcontrol/general_settings_tab.cpp | 13 | ||||
-rw-r--r-- | khotkeys/kcontrol/general_settings_tab.h | 2 | ||||
-rw-r--r-- | khotkeys/kcontrol/init.cpp | 47 | ||||
-rw-r--r-- | khotkeys/kcontrol/kcmkhotkeys.cpp | 33 | ||||
-rw-r--r-- | khotkeys/kcontrol/kcmkhotkeys.h | 15 | ||||
-rw-r--r-- | khotkeys/kcontrol/khotkeys.desktop | 2 | ||||
-rw-r--r-- | khotkeys/kcontrol/menuedit.cpp | 31 | ||||
-rw-r--r-- | khotkeys/kcontrol/tab_widget.cpp | 2 | ||||
-rw-r--r-- | khotkeys/kcontrol/ui/general_settings_tab_ui.ui | 8 | ||||
-rw-r--r-- | khotkeys/shared/settings.cpp | 6 | ||||
-rw-r--r-- | khotkeys/shared/settings.h | 1 |
21 files changed, 137 insertions, 223 deletions
diff --git a/khotkeys/CMakeL10n.txt b/khotkeys/CMakeL10n.txt index 9efb3961d..5a4d15337 100644 --- a/khotkeys/CMakeL10n.txt +++ b/khotkeys/CMakeL10n.txt @@ -3,3 +3,9 @@ tde_l10n_create_template( "khotkeys" ) tde_l10n_auto_add_subdirectories() + +tde_l10n_create_template( + CATALOG "desktop_files/khotkeys.desktop/" + SOURCES app/khotkeys.desktop kcontrol/khotkeys.desktop + DESTINATION "${CMAKE_SOURCE_DIR}/translations" +) diff --git a/khotkeys/app/CMakeLists.txt b/khotkeys/app/CMakeLists.txt index df2bd70db..470fdf1ce 100644 --- a/khotkeys/app/CMakeLists.txt +++ b/khotkeys/app/CMakeLists.txt @@ -22,6 +22,14 @@ link_directories( ) +##### other data ################################ + +tde_create_translated_desktop( + SOURCE khotkeys.desktop + DESTINATION ${SERVICES_INSTALL_DIR}/kded +) + + ##### kded_khotkeys (module) #################### tde_add_kpart( kded_khotkeys AUTOMOC diff --git a/khotkeys/app/app.cpp b/khotkeys/app/app.cpp index d05f3fd93..8da646ef6 100644 --- a/khotkeys/app/app.cpp +++ b/khotkeys/app/app.cpp @@ -16,6 +16,7 @@ #include "app.h" +#include <dcopclient.h> #include <tdecmdlineargs.h> #include <tdeconfig.h> #include <tdelocale.h> @@ -42,18 +43,16 @@ KHotKeysApp::KHotKeysApp() delete_helper( new TQObject ) { init_global_data( true, delete_helper ); // grab keys - // CHECKME triggery a dalsi vytvaret az tady za inicializaci actions_root = NULL; reread_configuration(); } KHotKeysApp::~KHotKeysApp() { - // CHECKME triggery a dalsi rusit uz tady pred cleanupem delete actions_root; -// Many global data should be destroyed while the TQApplication object still -// exists, and therefore 'this' cannot be the parent, as ~Object -// for 'this' would be called after ~TQApplication - use proxy object + // Many global data should be destroyed while the TQApplication object still + // exists, and therefore 'this' cannot be the parent, as ~Object() + // for 'this' would be called after ~TQApplication() - use proxy object delete delete_helper; } @@ -93,66 +92,52 @@ static int khotkeys_screen_number = 0; extern "C" int TDE_EXPORT kdemain( int argc, char** argv ) +{ + // Check if khotkeys is already running as a kded module. + // In such case just exit. + DCOPClient *dcopClient = new DCOPClient; + if (!dcopClient->isAttached()) + { + if (!dcopClient->attach()) + { + kdWarning(1217) << "khotkeys [application]: could not register with DCOP. Exiting." << endl; + delete dcopClient; + return 1; + } + } + TQCString replyType; + TQByteArray replyData; + if (dcopClient->call("kded", "kded", "loadedModules()", + TQByteArray(), replyType, replyData)) + { + if (replyType == "QCStringList") { - { - // multiheaded hotkeys - TQCString multiHead = getenv("TDE_MULTIHEAD"); - if (multiHead.lower() == "true") { - Display *dpy = XOpenDisplay(NULL); - if (! dpy) { - fprintf(stderr, "%s: FATAL ERROR while trying to open display %s\n", - argv[0], XDisplayName(NULL)); - exit(1); - } - - int number_of_screens = ScreenCount(dpy); - khotkeys_screen_number = DefaultScreen(dpy); - int pos; - TQCString displayname = XDisplayString(dpy); - XCloseDisplay(dpy); - dpy = 0; - - if ((pos = displayname.findRev('.')) != -1) - displayname.remove(pos, 10); - - TQCString env; - if (number_of_screens != 1) { - for (int i = 0; i < number_of_screens; i++) { - if (i != khotkeys_screen_number && fork() == 0) { - khotkeys_screen_number = i; - // break here because we are the child process, we don't - // want to fork() anymore - break; - } - } - - env.sprintf("DISPLAY=%s.%d", displayname.data(), khotkeys_screen_number); - if (putenv(strdup(env.data()))) { - fprintf(stderr, - "%s: WARNING: unable to set DISPLAY environment variable\n", - argv[0]); - perror("putenv()"); - } - } - } - } - - TQCString appname; - if (khotkeys_screen_number == 0) - appname = "khotkeys"; - else - appname.sprintf("khotkeys-screen-%d", khotkeys_screen_number); - - // no need to i18n these, no GUI - TDECmdLineArgs::init( argc, argv, appname, I18N_NOOP( "KHotKeys" ), - I18N_NOOP( "KHotKeys daemon" ), KHOTKEYS_VERSION ); - KUniqueApplication::addCmdLineOptions(); - if( !KHotKeysApp::start()) // already running - return 0; - KHotKeysApp app; - app.disableSessionManagement(); - return app.exec(); + TQDataStream reply(replyData, IO_ReadOnly); + QCStringList modules; + reply >> modules; + if (modules.contains("khotkeys")) + { + // khotkeys is already running as a service, do nothing + kdWarning(1217) << "khotkeys is already running as a kded module. Exiting." << endl; + delete dcopClient; + return 2; + } } + } + delete dcopClient; + + // no need to i18n these, no GUI + TDECmdLineArgs::init( argc, argv, "khotkeys", I18N_NOOP( "KHotKeys" ), + I18N_NOOP( "KHotKeys daemon" ), KHOTKEYS_VERSION ); + KUniqueApplication::addCmdLineOptions(); + if( !KHotKeysApp::start()) // already running + { + return 0; + } + KHotKeysApp app; + app.disableSessionManagement(); + return app.exec(); +} #include "app.moc" diff --git a/khotkeys/app/kded.cpp b/khotkeys/app/kded.cpp index db4153e01..c78504919 100644 --- a/khotkeys/app/kded.cpp +++ b/khotkeys/app/kded.cpp @@ -16,6 +16,7 @@ #include "kded.h" +#include <dcopclient.h> #include <tdecmdlineargs.h> #include <tdeconfig.h> #include <tdelocale.h> @@ -35,9 +36,17 @@ extern "C" TDE_EXPORT KDEDModule *create_khotkeys( const TQCString& obj ) - { - return new KHotKeys::KHotKeysModule( obj ); - } +{ + // Check if khotkeys is already running as a stand alone application. + // In such case just exit. + if (kapp->dcopClient()->isApplicationRegistered("khotkeys")) + { + kdWarning(1217) << "khotkeys [kded module] is already running as a standalone application. Exiting." << endl; + return nullptr; + } + + return new KHotKeys::KHotKeysModule( obj ); +} namespace KHotKeys { @@ -47,22 +56,7 @@ namespace KHotKeys KHotKeysModule::KHotKeysModule( const TQCString& obj ) : KDEDModule( obj ) { - for( int i = 0; - i < 5; - ++i ) - { - if( kapp->dcopClient()->isApplicationRegistered( "khotkeys" )) - { - TQByteArray data, replyData; - TQCString reply; - // wait for it to finish - kapp->dcopClient()->call( "khotkeys*", "khotkeys", "quit()", data, reply, replyData ); - sleep( 1 ); - } - } - client.registerAs( "khotkeys", false ); // extra dcop connection (like if it was an app) init_global_data( true, this ); // grab keys - // CHECKME triggery a dalsi vytvaret az tady za inicializaci actions_root = NULL; reread_configuration(); } diff --git a/khotkeys/app/kded.h b/khotkeys/app/kded.h index b2740a3a1..026087abe 100644 --- a/khotkeys/app/kded.h +++ b/khotkeys/app/kded.h @@ -12,27 +12,27 @@ #define _KHOTKEYS_KDED_H_ #include <kdedmodule.h> -#include <dcopclient.h> namespace KHotKeys { class Action_data_group; -class KHotKeysModule - : public KDEDModule +class KHotKeysModule : public KDEDModule { TQ_OBJECT K_DCOP + k_dcop: ASYNC reread_configuration(); ASYNC quit(); + public: KHotKeysModule( const TQCString& obj ); virtual ~KHotKeysModule(); + private: Action_data_group* actions_root; - DCOPClient client; }; //*************************************************************************** diff --git a/khotkeys/app/khotkeys.desktop b/khotkeys/app/khotkeys.desktop new file mode 100644 index 000000000..b40b5a6e5 --- /dev/null +++ b/khotkeys/app/khotkeys.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Type=Service + +Name=KHotkeys Daemon + +Comment=Handles input actions for the current session + +X-TDE-ServiceTypes=KDEDModule +X-TDE-ModuleType=Library +X-TDE-Library=khotkeys +X-TDE-FactoryName=khotkeys +X-TDE-Kded-autoload=true +X-TDE-Kded-load-on-demand=false diff --git a/khotkeys/data/trinity2b1.khotkeys b/khotkeys/data/trinity2b1.khotkeys index 7dfe3e0ec..967f389ad 100644 --- a/khotkeys/data/trinity2b1.khotkeys +++ b/khotkeys/data/trinity2b1.khotkeys @@ -395,7 +395,6 @@ MouseButton=2 Timeout=1000 [Main] -Autostart=true Disabled=false Version=2 ImportId=trinity2b1 diff --git a/khotkeys/kcontrol/CMakeL10n.txt b/khotkeys/kcontrol/CMakeL10n.txt deleted file mode 100644 index a51e4afa8..000000000 --- a/khotkeys/kcontrol/CMakeL10n.txt +++ /dev/null @@ -1,7 +0,0 @@ -##### create translation templates ############## - -tde_l10n_create_template( - CATALOG "desktop_files/khotkeys.desktop/" - SOURCES khotkeys.desktop - DESTINATION "${CMAKE_SOURCE_DIR}/translations" -) diff --git a/khotkeys/kcontrol/CMakeLists.txt b/khotkeys/kcontrol/CMakeLists.txt index 902c5a0e6..b1bd06bdd 100644 --- a/khotkeys/kcontrol/CMakeLists.txt +++ b/khotkeys/kcontrol/CMakeLists.txt @@ -47,12 +47,3 @@ tde_add_kpart( kcm_khotkeys AUTOMOC LINK ui-static DESTINATION ${PLUGIN_INSTALL_DIR} ) - - -##### kcm_khotkeys_init (module) ################ - -tde_add_kpart( kcm_khotkeys_init AUTOMOC - SOURCES init.cpp - LINK tdecore-shared - DESTINATION ${PLUGIN_INSTALL_DIR} -) diff --git a/khotkeys/kcontrol/Makefile.am b/khotkeys/kcontrol/Makefile.am index 03a728ae3..8f0a18480 100644 --- a/khotkeys/kcontrol/Makefile.am +++ b/khotkeys/kcontrol/Makefile.am @@ -1,6 +1,6 @@ SUBDIRS = ui -kde_module_LTLIBRARIES = kcm_khotkeys.la kcm_khotkeys_init.la +kde_module_LTLIBRARIES = kcm_khotkeys.la kcm_khotkeys_la_SOURCES = \ menuedit.cpp window_trigger_widget.cpp tab_widget.cpp main_buttons_widget.cpp \ @@ -15,11 +15,6 @@ kcm_khotkeys_la_SOURCES = \ kcm_khotkeys_la_LIBADD = ui/libui.la $(LIB_TDEUI) $(LIB_ARTS) kcm_khotkeys_la_LDFLAGS = $(all_libraries) -module -avoid-version -no-undefined -kcm_khotkeys_init_la_SOURCES = init.cpp - -kcm_khotkeys_init_la_LIBADD = $(LIB_TDECORE) -kcm_khotkeys_init_la_LDFLAGS = $(all_libraries) -module -avoid-version -no-undefined - noinst_HEADERS = menuedit.h window_trigger_widget.h \ tab_widget.h main_buttons_widget.h actions_listview_widget.h menuentry_widget.h \ general_tab.h action_group_tab.h kcmkhotkeys.h windowdef_list_widget.h \ diff --git a/khotkeys/kcontrol/general_settings_tab.cpp b/khotkeys/kcontrol/general_settings_tab.cpp index a0e1e84c7..07382c4ed 100644 --- a/khotkeys/kcontrol/general_settings_tab.cpp +++ b/khotkeys/kcontrol/general_settings_tab.cpp @@ -26,9 +26,6 @@ namespace KHotKeys General_settings_tab::General_settings_tab( TQWidget* parent_P, const char* name_P ) : General_settings_tab_ui( parent_P, name_P ) { - // KHotKeys::Module::changed() - connect( disable_daemon_checkbox, TQ_SIGNAL( clicked()), - module, TQ_SLOT( changed())); } void General_settings_tab::import_clicked() @@ -36,16 +33,6 @@ void General_settings_tab::import_clicked() module->import(); } -void General_settings_tab::write_data() const - { - module->set_daemon_disabled( disable_daemon_checkbox->isChecked()); - } - -void General_settings_tab::read_data() - { - disable_daemon_checkbox->setChecked( module->daemon_disabled()); - } - void General_settings_tab::clear_data() { // "global" tab, not action specific, do nothing diff --git a/khotkeys/kcontrol/general_settings_tab.h b/khotkeys/kcontrol/general_settings_tab.h index ba76bf68e..962111b36 100644 --- a/khotkeys/kcontrol/general_settings_tab.h +++ b/khotkeys/kcontrol/general_settings_tab.h @@ -22,8 +22,6 @@ class General_settings_tab TQ_OBJECT public: General_settings_tab( TQWidget* parent = NULL, const char* name = NULL ); - void read_data(); - void write_data() const; public slots: void clear_data(); protected slots: diff --git a/khotkeys/kcontrol/init.cpp b/khotkeys/kcontrol/init.cpp deleted file mode 100644 index 14a9c964b..000000000 --- a/khotkeys/kcontrol/init.cpp +++ /dev/null @@ -1,47 +0,0 @@ -/**************************************************************************** - - KHotKeys - - Copyright (C) 1999-2001 Lubos Lunak <l.lunak@kde.org> - - Distributed under the terms of the GNU General Public License version 2. - -****************************************************************************/ - -#define _INIT_CPP_ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#include <dcopref.h> -#include <tdeapplication.h> -#include <tdeconfig.h> -#include <kdebug.h> -#include <stdlib.h> - -extern "C" -{ - TDE_EXPORT void init_khotkeys() - { - TDEConfig cfg( "khotkeysrc", true ); - cfg.setGroup( "Main" ); - if( !cfg.readBoolEntry( "Autostart", false )) - return; - // Non-xinerama multhead support in KDE is just a hack - // involving forking apps per-screen. Don't bother with - // kded modules in such case. - TQCString multiHead = getenv("TDE_MULTIHEAD"); - if (multiHead.lower() == "true") - kapp->tdeinitExec( "khotkeys" ); - else - { - DCOPRef ref( "kded", "kded" ); - if( !ref.call( "loadModule", TQCString( "khotkeys" ))) - { - kdWarning( 1217 ) << "Loading of khotkeys module failed." << endl; - kapp->tdeinitExec( "khotkeys" ); - } - } - } -} diff --git a/khotkeys/kcontrol/kcmkhotkeys.cpp b/khotkeys/kcontrol/kcmkhotkeys.cpp index b63416eeb..406a29e35 100644 --- a/khotkeys/kcontrol/kcmkhotkeys.cpp +++ b/khotkeys/kcontrol/kcmkhotkeys.cpp @@ -122,24 +122,33 @@ void Module::save() tab_widget->save_current_action_changes(); settings.actions = _actions_root; settings.write_settings(); - if( daemon_disabled()) + if(kapp->dcopClient()->isApplicationRegistered( "khotkeys" )) { + // khotkeys running as a standalone application TQByteArray data; - kapp->dcopClient()->send( "khotkeys*", "khotkeys", "quit()", data ); - kdDebug( 1217 ) << "disabling khotkeys daemon" << endl; + kdDebug( 1217 ) << "telling khotkeys standalone application to reread configuration" << endl; + kapp->dcopClient()->send( "khotkeys", "khotkeys", "reread_configuration()", data ); } else { - if( !kapp->dcopClient()->isApplicationRegistered( "khotkeys" )) + TQCString replyType; + TQByteArray replyData; + if (kapp->dcopClient()->call("kded", "kded", "loadedModules()", + TQByteArray(), replyType, replyData)) { - kdDebug( 1217 ) << "launching new khotkeys daemon" << endl; - TDEApplication::tdeinitExec( "khotkeys" ); - } - else - { - TQByteArray data; - kapp->dcopClient()->send( "khotkeys*", "khotkeys", "reread_configuration()", data ); - kdDebug( 1217 ) << "telling khotkeys daemon to reread configuration" << endl; + if (replyType == "QCStringList") + { + TQDataStream reply(replyData, IO_ReadOnly); + QCStringList modules; + reply >> modules; + if (modules.contains("khotkeys")) + { + // khotkeys running as a kded service + TQByteArray data; + kdDebug( 1217 ) << "telling khotkeys kded daemon to reread configuration" << endl; + kapp->dcopClient()->send( "kded", "khotkeys", "reread_configuration()", data ); + } + } } } emit TDECModule::changed( false ); diff --git a/khotkeys/kcontrol/kcmkhotkeys.h b/khotkeys/kcontrol/kcmkhotkeys.h index 7d1876d8d..46e28ecd9 100644 --- a/khotkeys/kcontrol/kcmkhotkeys.h +++ b/khotkeys/kcontrol/kcmkhotkeys.h @@ -51,8 +51,6 @@ class Module int gesture_timeout() const; void set_gestures_exclude( Windowdef_list* windows ); const Windowdef_list* gestures_exclude() const; - void set_daemon_disabled( bool disable ); - bool daemon_disabled() const; void import(); TDEShortcut voice_shortcut() const; void set_voice_shortcut( const TDEShortcut&) ; @@ -140,19 +138,6 @@ const Windowdef_list* Module::gestures_exclude() const } inline -void Module::set_daemon_disabled( bool disabled_P ) - { - settings.daemon_disabled = disabled_P; - } - -inline -bool Module::daemon_disabled() const - { - return settings.daemon_disabled; - } - - -inline void Module::set_voice_shortcut( const TDEShortcut& cut) { settings.voice_shortcut=cut; diff --git a/khotkeys/kcontrol/khotkeys.desktop b/khotkeys/kcontrol/khotkeys.desktop index 7c1f4efb7..d9e0c5af2 100644 --- a/khotkeys/kcontrol/khotkeys.desktop +++ b/khotkeys/kcontrol/khotkeys.desktop @@ -5,8 +5,6 @@ Type=Application X-DocPath=kcontrol/khotkeys/index.html X-TDE-ModuleType=Library X-TDE-Library=khotkeys -X-TDE-Init-Library=khotkeys_init -X-TDE-Init=khotkeys X-TDE-StartupNotify=false Categories=Qt;TDE;X-TDE-settings-accessibility; diff --git a/khotkeys/kcontrol/menuedit.cpp b/khotkeys/kcontrol/menuedit.cpp index 08b8a3c22..80c632d5b 100644 --- a/khotkeys/kcontrol/menuedit.cpp +++ b/khotkeys/kcontrol/menuedit.cpp @@ -191,16 +191,34 @@ void khotkeys_send_reread_config() TQByteArray data; if( !kapp->dcopClient()->isAttached()) kapp->dcopClient()->attach(); - if( !kapp->dcopClient()->isApplicationRegistered( "khotkeys" )) + if(kapp->dcopClient()->isApplicationRegistered( "khotkeys" )) { - kdDebug( 1217 ) << "launching new khotkeys daemon" << endl; - TDEApplication::tdeinitExec( "khotkeys" ); + // khotkeys running as a standalone application + TQByteArray data; + kdDebug( 1217 ) << "telling khotkeys standalone application to reread configuration" << endl; + kapp->dcopClient()->send( "khotkeys", "khotkeys", "reread_configuration()", data ); } else { - TQByteArray data; - kapp->dcopClient()->send( "khotkeys*", "khotkeys", "reread_configuration()", data ); - kdDebug( 1217 ) << "telling khotkeys daemon to reread configuration" << endl; + TQCString replyType; + TQByteArray replyData; + if (kapp->dcopClient()->call("kded", "kded", "loadedModules()", + TQByteArray(), replyType, replyData)) + { + if (replyType == "QCStringList") + { + TQDataStream reply(replyData, IO_ReadOnly); + QCStringList modules; + reply >> modules; + if (modules.contains("khotkeys")) + { + // khotkeys running as a kded service + TQByteArray data; + kdDebug( 1217 ) << "telling khotkeys kded daemon to reread configuration" << endl; + kapp->dcopClient()->send( "kded", "khotkeys", "reread_configuration()", data ); + } + } + } } } @@ -303,7 +321,6 @@ TQString khotkeys_change_menu_entry_shortcut( const TQString& entry_P, return ""; } entry->reparent( khotkeys_get_menu_root( settings.actions )); - settings.daemon_disabled = false; // #91782 settings.write_settings(); khotkeys_send_reread_config(); return shortcut; diff --git a/khotkeys/kcontrol/tab_widget.cpp b/khotkeys/kcontrol/tab_widget.cpp index 236d755d2..9f9bba39c 100644 --- a/khotkeys/kcontrol/tab_widget.cpp +++ b/khotkeys/kcontrol/tab_widget.cpp @@ -103,7 +103,6 @@ void Tab_widget::save_current_action_changes() if( current_type == NONE ) // info, global settings { static_cast< Gestures_settings_tab* >( pages[ TAB_GESTURES_SETTINGS ] )->write_data(); // saves - static_cast< General_settings_tab* >( pages[ TAB_GENERAL_SETTINGS ] )->write_data(); // saves static_cast< Voice_settings_tab* >( pages[ TAB_VOICE_SETTINGS ] )->write_data(); // saves } else if( current_type == GROUP ) @@ -235,7 +234,6 @@ void Tab_widget::load_current_action() { static_cast< Gestures_settings_tab* >( pages[ TAB_GESTURES_SETTINGS ] )->read_data(); // loads static_cast< Voice_settings_tab* >( pages[ TAB_VOICE_SETTINGS ] )->read_data(); // loads - static_cast< General_settings_tab* >( pages[ TAB_GENERAL_SETTINGS ] )->read_data(); // loads } else if( current_type == GROUP ) { diff --git a/khotkeys/kcontrol/ui/general_settings_tab_ui.ui b/khotkeys/kcontrol/ui/general_settings_tab_ui.ui index 9242b6da9..e119c8512 100644 --- a/khotkeys/kcontrol/ui/general_settings_tab_ui.ui +++ b/khotkeys/kcontrol/ui/general_settings_tab_ui.ui @@ -16,14 +16,6 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="TQCheckBox"> - <property name="name"> - <cstring>disable_daemon_checkbox</cstring> - </property> - <property name="text"> - <string>Disable KHotKeys daemon</string> - </property> - </widget> <widget class="TQLayoutWidget"> <property name="name"> <cstring>layout1</cstring> diff --git a/khotkeys/shared/settings.cpp b/khotkeys/shared/settings.cpp index becacd5d1..c4068564e 100644 --- a/khotkeys/shared/settings.cpp +++ b/khotkeys/shared/settings.cpp @@ -103,8 +103,6 @@ bool Settings::read_settings( TDEConfig& cfg_P, bool include_disabled_P, ImportT } if( import_P != ImportNone ) return true; // don't read global settings - cfg_P.setGroup( "Main" ); // main group - daemon_disabled = cfg_P.readBoolEntry( "Disabled", false ); cfg_P.setGroup( "Gestures" ); gestures_disabled_globally = cfg_P.readBoolEntry( "Disabled", true ); gesture_mouse_button = cfg_P.readNumEntry( "MouseButton", 2 ); @@ -132,9 +130,6 @@ void Settings::write_settings() cfg.writeEntry( "AlreadyImported", already_imported ); cfg.setGroup( "Data" ); int cnt = write_actions_recursively_v2( cfg, actions, true ); - cfg.setGroup( "Main" ); - cfg.writeEntry( "Autostart", cnt != 0 && !daemon_disabled ); - cfg.writeEntry( "Disabled", daemon_disabled ); cfg.setGroup( "Gestures" ); cfg.writeEntry( "Disabled", gestures_disabled_globally ); cfg.writeEntry( "MouseButton", gesture_mouse_button ); @@ -155,7 +150,6 @@ void Settings::write_settings() // return value means the number of enabled actions written in the cfg file -// i.e. 'Autostart' for value > 0 should be on int Settings::write_actions_recursively_v2( TDEConfig& cfg_P, Action_data_group* parent_P, bool enabled_P ) { int enabled_cnt = 0; diff --git a/khotkeys/shared/settings.h b/khotkeys/shared/settings.h index 753d056c3..da4a291c1 100644 --- a/khotkeys/shared/settings.h +++ b/khotkeys/shared/settings.h @@ -37,7 +37,6 @@ class TDE_EXPORT Settings bool gestures_disabled_globally; int gesture_mouse_button; int gesture_timeout; - bool daemon_disabled; Windowdef_list* gestures_exclude; TDEShortcut voice_shortcut; protected: |