[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdenonbeta/ktranslator
From: Raul Fernandes <rgfbr () yahoo ! com ! br>
Date: 2005-09-02 22:02:38
Message-ID: 1125698558.148423.8046.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 456450 by rgfbr:
Add option to choose what modifier key is used to trigger the translation
M +1 -1 ChangeLog
M +1 -1 TODO
M +0 -1 ktranslator.desktop
M +3 -3 main.cpp
M +10 -1 uiplugins/clipboard/ktranslator_clipboard.cpp
M +1 -0 uiplugins/clipboard/ktranslator_clipboard.h
--- trunk/kdenonbeta/ktranslator/ChangeLog #456449:456450
@@ -1,8 +1,8 @@
2005-09-02
Add a option to set a timeout for results window
The word to be translated is shown in results window
- KTranslator is a KUniqueApplication now
A little optimization in Dictd plugin
+ Add option to choose what modifier key is used to trigger the translation
2005-09-01
ESC key closes the results window now
--- trunk/kdenonbeta/ktranslator/TODO #456449:456450
@@ -1,7 +1,7 @@
Plugin for DICT servers
Plugin for StarDict dictionaries
Trim the selected word (remove commas, periods and others)
-Add option to choose what modifier should be pressed to trigger the translation
+Add a GUI to choose what modifier should be pressed to trigger the translation
Add support to KNewStuff
Add support to add new words and send them through Internet
Add a quit option in the tool bar (for those who have no system tray)
--- trunk/kdenonbeta/ktranslator/ktranslator.desktop #456449:456450
@@ -19,4 +19,3 @@
Comment[ta]=ஒரு கேடியி \
மொழிப்பெயர்ப்பு பயன்பாடு \
Comment[tr]=Bir KDE Çevirme Uygulaması Comment[xx]=xxA KDE Translation \
Applicationxx
-X-DCOP-ServiceType=Unique
--- trunk/kdenonbeta/ktranslator/main.cpp #456449:456450
@@ -20,7 +20,7 @@
#include "ktranslator.h"
-#include <kuniqueapplication.h>
+#include <kapplication.h>
#include <kaboutdata.h>
#include <kcmdlineargs.h>
#include <klocale.h>
@@ -39,11 +39,11 @@
int main(int argc, char **argv)
{
KAboutData about("ktranslator", I18N_NOOP("ktranslator"), version, description,
- KAboutData::License_GPL, "(C) 2004 Raul Fernandes", 0, 0, \
"rgfbr@yahoo.com.br"); + KAboutData::License_GPL, "(C) 2005 Raul Fernandes", 0, \
0, "rgfbr@yahoo.com.br"); about.addAuthor( "Raul Fernandes", 0, "rgfbr@yahoo.com.br" \
); KCmdLineArgs::init(argc, argv, &about);
KCmdLineArgs::addCmdLineOptions( options );
- KUniqueApplication app;
+ KApplication app;
ktranslator *mainWin = 0;
if (app.isRestored())
--- trunk/kdenonbeta/ktranslator/uiplugins/clipboard/ktranslator_clipboard.cpp \
#456449:456450 @@ -30,6 +30,7 @@
#include <kactionclasses.h>
#include <kpopupmenu.h>
#include <kiconloader.h>
+#include <kconfig.h>
K_EXPORT_COMPONENT_FACTORY( ktranslator_clipboard,
KGenericFactory<Clipboard>( "ktranslator_clipboard" ) )
@@ -55,12 +56,20 @@
dock->actionCollection()->insert( actionWatch );
actionWatch->plug( dock->contextMenu(), 1 );
setEnabled( enabled );
+
+ KConfig *config = kapp->config();
+ config->setGroup( "general" );
+ QString a = config->readEntry( "button", "control" );
+ if( a == "shift" ) button = 256;
+ else if( a == "control" ) button = 512;
+ else if( a == "alt" ) button = 1024;
+ else if( a == "meta" ) button = 2048;
}
void Clipboard::slotChanged()
{
#ifdef KDE_3_4
- if( /*config::needControl() &&*/ ! ( kapp->keyboardMouseState() & ControlButton \
) ) return; + if( /*config::needControl() &&*/ ! ( kapp->keyboardMouseState() & \
button ) ) return; #else
if( /*config::needControl() &&*/ ! ( kapp->keyboardModifiers() & 4 ) ) return;
#endif
--- trunk/kdenonbeta/ktranslator/uiplugins/clipboard/ktranslator_clipboard.h \
#456449:456450 @@ -39,6 +39,7 @@
ktrClipboard *clip;
bool enabled;
KToggleAction *actionWatch;
+ int button;
};
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic