Commit 15c91154c7c1bea4ef3ba4e5bcc55d184f873f38
1 parent
2f55e463
Exists in
master
correção no plugin
Showing
6 changed files
with
9 additions
and
8 deletions
Show diff stats
Clipboard/Clipboard.py
Clipboard/Clipboard.pyc
No preview for this file type
plugin/Plugin-x86/CorePlugin.dll
No preview for this file type
plugin/Plugin-x86/CorePlugin.lib
No preview for this file type
plugin/corePlugin.cpp
| ... | ... | @@ -15,8 +15,7 @@ |
| 15 | 15 | tradutor = new PyTradutor(); |
| 16 | 16 | |
| 17 | 17 | //Objeto usado para copiar texto da área de transferência |
| 18 | - clipboard = new PyClip(); | |
| 19 | - clipboard->bdragOn(); | |
| 18 | + clipboard.bdragOn(); | |
| 20 | 19 | |
| 21 | 20 | return 1; |
| 22 | 21 | } |
| ... | ... | @@ -24,15 +23,15 @@ |
| 24 | 23 | EXPORT_API char* coreExecute() |
| 25 | 24 | { |
| 26 | 25 | //Copia área de transferência para input |
| 27 | - char *input = clipboard->clip(); | |
| 28 | - | |
| 26 | + char *input = clipboard.clip(); | |
| 27 | + | |
| 29 | 28 | //Retorna a tradução do texto para glosa |
| 30 | 29 | return strlwr(tradutor->convertStringToGlosa(input)); |
| 31 | 30 | } |
| 32 | 31 | |
| 33 | 32 | EXPORT_API int coreFinalize() |
| 34 | 33 | { |
| 35 | - clipboard->bdragOff(); | |
| 34 | + clipboard.bdragOff(); | |
| 36 | 35 | delete tradutor; |
| 37 | 36 | return 1; |
| 38 | 37 | } | ... | ... |
plugin/corePlugin.h
| 1 | 1 | #ifndef _COREPLUGIN_H |
| 2 | 2 | #define _COREPLUGIN_H |
| 3 | 3 | |
| 4 | -#include "pyTradutor.h" | |
| 4 | +#include <iostream> | |
| 5 | 5 | #include "pyClip.h" |
| 6 | +#include "pyTradutor.h" | |
| 6 | 7 | #include <string.h> |
| 7 | 8 | |
| 9 | +using namespace std; | |
| 8 | 10 | using namespace Tradutor; |
| 9 | 11 | using namespace Clipboard; |
| 10 | 12 | |
| ... | ... | @@ -14,7 +16,7 @@ extern "C" |
| 14 | 16 | PyTradutor *tradutor; |
| 15 | 17 | |
| 16 | 18 | //Usado para copiar texto da área de transferência |
| 17 | - PyClip *clipboard; | |
| 19 | + PyClip clipboard; | |
| 18 | 20 | |
| 19 | 21 | //Inicializa Objetos |
| 20 | 22 | EXPORT_API int coreInitize(void); | ... | ... |