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);
|
bool haveSelectionActive = m_EdnBuf.GetSelectionPos(SELECTION_PRIMARY, SelectionStart, SelectionEnd, SelectionIsRect, SelectionRectStart, SelectionRectEnd);
|
||||||
if (true == haveSelectionActive) {
|
if (true == haveSelectionActive) {
|
||||||
// Replace Data :
|
// Replace Data :
|
||||||
// TODO : Reset this : ... m_EdnBuf.ReplaceSelected(SELECTION_PRIMARY, data.GetDirectPointer());//, strlen(data.GetDirectPointer()));
|
Edn::VectorType<int8_t> myData = data.GetVector();
|
||||||
// TODO : Reset this : ... SetInsertPosition(SelectionStart + strlen(data.GetDirectPointer()));
|
m_EdnBuf.ReplaceSelected(SELECTION_PRIMARY, myData);
|
||||||
|
SetInsertPosition(SelectionStart + myData.Size());
|
||||||
}
|
}
|
||||||
SetModify(true);
|
SetModify(true);
|
||||||
}
|
}
|
||||||
|
@ -192,15 +192,15 @@ void Search::Display(GtkWindow *parent)
|
|||||||
} else {
|
} else {
|
||||||
gtk_widget_set_sensitive(m_CkMatchCase, true);
|
gtk_widget_set_sensitive(m_CkMatchCase, true);
|
||||||
}
|
}
|
||||||
|
// Remove data form the search
|
||||||
Edn::String myDataString;
|
Edn::String myDataString = "";
|
||||||
SearchData::GetSearch(myDataString);
|
SearchData::SetSearch(myDataString);
|
||||||
gtk_entry_set_text(GTK_ENTRY(m_searchEntry), myDataString.c_str());
|
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;
|
m_haveSearchData = false;
|
||||||
} else {
|
//} else {
|
||||||
m_haveSearchData = true;
|
// m_haveSearchData = true;
|
||||||
}
|
//}
|
||||||
|
|
||||||
SearchData::GetReplace(myDataString);
|
SearchData::GetReplace(myDataString);
|
||||||
gtk_entry_set_text(GTK_ENTRY(m_replaceEntry), myDataString.c_str());
|
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);
|
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
|
// display the dialogue box
|
||||||
gtk_widget_show_all(m_localDialog);
|
gtk_widget_show_all(m_localDialog);
|
||||||
|
|
||||||
|
@ -584,6 +584,8 @@ Edn::VectorType<int8_t> Edn::String::GetVector(void)
|
|||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Unitary test for the string system
|
* @brief Unitary test for the string system
|
||||||
*
|
*
|
||||||
|
@ -16,12 +16,10 @@
|
|||||||
|
|
||||||
# action a faire (ordonner par révision) :
|
# action a faire (ordonner par révision) :
|
||||||
* 0.1.X :
|
* 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)
|
- 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 ...
|
- Edn::VectorType : Rewrite the erase fuction to support start => stop and Erase len methode ...
|
||||||
* 0.2.X :
|
* 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)
|
- 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
|
- sys : Mise en place des colorisation de base pour le
|
||||||
* java script
|
* java script
|
||||||
@ -44,6 +42,7 @@
|
|||||||
* 0.5.X :
|
* 0.5.X :
|
||||||
- project : list of current files open
|
- 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...
|
- 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
|
# Text Editor
|
||||||
|
|
||||||
|
6
test2.c
6
test2.c
@ -18,15 +18,15 @@
|
|||||||
//#include "tools_debug.h"
|
//#include "tools_debug.h"
|
||||||
#include "tools_globals.h"
|
#include "tools_globals.h"
|
||||||
#include "EdnBuf.h"
|
#include "EdnBuf.h"
|
||||||
|
Edn
|
||||||
m_isUndoProcessing = false;
|
m_isUndoProcessing = false;
|
||||||
m_isRedoProcessing = false;
|
m_isRedoProcessing = false;
|
||||||
|
Edn
|
||||||
// Load highlight system :
|
// Load highlight system :
|
||||||
HighlightManager *myHighlightManager = HighlightManager::getInstance();
|
HighlightManager *myHighlightManager = HighlightManager::getInstance();
|
||||||
EdnString plop = ".c";
|
EdnString plop = ".c";
|
||||||
m_Highlight = myHighlightManager->Get(plop);
|
m_Highlight = myHighlightManager->Get(plop);
|
||||||
//m_Highlight = NULL;
|
//m_Highlight = NULL;
|
||||||
m_nbLine = 1;
|
m_nbLine = 1;Edn
|
||||||
m_HLDataSequence = 0;
|
m_HLDataSequence = 0;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user