REPLACE : addition done
This commit is contained in:
parent
643f2e38b3
commit
fd13467832
@ -1202,9 +1202,9 @@ void BufferText::Replace(Edn::String &data)
|
||||
bool haveSelectionActive = m_EdnBuf.GetSelectionPos(SELECTION_PRIMARY, SelectionStart, SelectionEnd, SelectionIsRect, SelectionRectStart, SelectionRectEnd);
|
||||
if (true == haveSelectionActive) {
|
||||
// Replace Data :
|
||||
// TODO : Reset this : ... m_EdnBuf.ReplaceSelected(SELECTION_PRIMARY, data.GetDirectPointer());//, strlen(data.GetDirectPointer()));
|
||||
// TODO : Reset this : ... SetInsertPosition(SelectionStart + strlen(data.GetDirectPointer()));
|
||||
|
||||
Edn::VectorType<int8_t> myData = data.GetVector();
|
||||
m_EdnBuf.ReplaceSelected(SELECTION_PRIMARY, myData);
|
||||
SetInsertPosition(SelectionStart + myData.Size());
|
||||
}
|
||||
SetModify(true);
|
||||
}
|
||||
|
@ -192,15 +192,15 @@ void Search::Display(GtkWindow *parent)
|
||||
} else {
|
||||
gtk_widget_set_sensitive(m_CkMatchCase, true);
|
||||
}
|
||||
|
||||
Edn::String myDataString;
|
||||
SearchData::GetSearch(myDataString);
|
||||
// Remove data form the search
|
||||
Edn::String myDataString = "";
|
||||
SearchData::SetSearch(myDataString);
|
||||
gtk_entry_set_text(GTK_ENTRY(m_searchEntry), myDataString.c_str());
|
||||
if (0 == strlen(myDataString.c_str())) {
|
||||
//if (0 == strlen(myDataString.c_str())) {
|
||||
m_haveSearchData = false;
|
||||
} else {
|
||||
m_haveSearchData = true;
|
||||
}
|
||||
//} else {
|
||||
// m_haveSearchData = true;
|
||||
//}
|
||||
|
||||
SearchData::GetReplace(myDataString);
|
||||
gtk_entry_set_text(GTK_ENTRY(m_replaceEntry), myDataString.c_str());
|
||||
@ -220,6 +220,10 @@ void Search::Display(GtkWindow *parent)
|
||||
gtk_widget_set_sensitive(m_BtReplaceAndNext, m_haveReplaceData);
|
||||
}
|
||||
|
||||
// set focus on a specific widget :
|
||||
gtk_window_set_focus(parent, m_searchEntry);
|
||||
|
||||
|
||||
// display the dialogue box
|
||||
gtk_widget_show_all(m_localDialog);
|
||||
|
||||
|
@ -584,6 +584,8 @@ Edn::VectorType<int8_t> Edn::String::GetVector(void)
|
||||
return out;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @brief Unitary test for the string system
|
||||
*
|
||||
|
@ -16,12 +16,10 @@
|
||||
|
||||
# action a faire (ordonner par révision) :
|
||||
* 0.1.X :
|
||||
- ctags : Back simple et multiple
|
||||
- sys : search complet, replace complet and replace ALL ...
|
||||
- gui : demander l'enregistrement avant de fermer (quand c'est nécessaire)
|
||||
- Faire les deplacement de EdnXXX dans le nameSpace Edn::XXX
|
||||
- Edn::VectorType : Rewrite the erase fuction to support start => stop and Erase len methode ...
|
||||
* 0.2.X :
|
||||
- gui : Mise en place d'un display ligne par ligne
|
||||
- gui : Demander la création de nouveaux fichier quand il n'existe pas (a l'ouverture en ligne de commande)
|
||||
- sys : Mise en place des colorisation de base pour le
|
||||
* java script
|
||||
@ -44,6 +42,7 @@
|
||||
* 0.5.X :
|
||||
- project : list of current files open
|
||||
- gui : Parameters : et en autre la taille de la police ... et voir pour la récupérer sur le system... et ce serait cool...
|
||||
- sys : replace ALL
|
||||
|
||||
# Text Editor
|
||||
|
||||
|
6
test2.c
6
test2.c
@ -18,15 +18,15 @@
|
||||
//#include "tools_debug.h"
|
||||
#include "tools_globals.h"
|
||||
#include "EdnBuf.h"
|
||||
|
||||
Edn
|
||||
m_isUndoProcessing = false;
|
||||
m_isRedoProcessing = false;
|
||||
|
||||
Edn
|
||||
// Load highlight system :
|
||||
HighlightManager *myHighlightManager = HighlightManager::getInstance();
|
||||
EdnString plop = ".c";
|
||||
m_Highlight = myHighlightManager->Get(plop);
|
||||
//m_Highlight = NULL;
|
||||
m_nbLine = 1;
|
||||
m_nbLine = 1;Edn
|
||||
m_HLDataSequence = 0;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user