aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/desktop-utils
diff options
context:
space:
mode:
Diffstat (limited to 'src-qt5/desktop-utils')
-rw-r--r--src-qt5/desktop-utils/lumina-archiver/MainUI.cpp2
-rw-r--r--src-qt5/desktop-utils/lumina-archiver/imgDialog.cpp6
-rw-r--r--src-qt5/desktop-utils/lumina-pdf/PrintWidget.cpp15
-rw-r--r--src-qt5/desktop-utils/lumina-pdf/PrintWidget.h2
-rw-r--r--src-qt5/desktop-utils/lumina-pdf/Renderer-mupdf.cpp17
-rw-r--r--src-qt5/desktop-utils/lumina-pdf/mainUI.cpp11
-rw-r--r--src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp3
-rw-r--r--src-qt5/desktop-utils/lumina-textedit/MainUI.cpp44
-rw-r--r--src-qt5/desktop-utils/lumina-textedit/MainUI.h20
-rw-r--r--src-qt5/desktop-utils/lumina-textedit/PlainTextEditor.cpp1
-rw-r--r--src-qt5/desktop-utils/lumina-textedit/PlainTextEditor.h14
-rw-r--r--src-qt5/desktop-utils/lumina-textedit/lumina-textedit.pro2
-rw-r--r--src-qt5/desktop-utils/lumina-textedit/syntax_rules/md.syntax12
13 files changed, 89 insertions, 60 deletions
diff --git a/src-qt5/desktop-utils/lumina-archiver/MainUI.cpp b/src-qt5/desktop-utils/lumina-archiver/MainUI.cpp
index 3d901e8c..eeb0f507 100644
--- a/src-qt5/desktop-utils/lumina-archiver/MainUI.cpp
+++ b/src-qt5/desktop-utils/lumina-archiver/MainUI.cpp
@@ -110,7 +110,7 @@ void MainUI::LoadArguments(QStringList args){
connect(BACKEND, SIGNAL(ExtractSuccessful()), delayClose, SLOT(start()) );
}
BACKEND->loadFile(files[0]);
- ui->actionUSB_Image->setEnabled(files[0].simplified().endsWith(".img"));
+ ui->actionUSB_Image->setEnabled(files[0].simplified().endsWith(".img") || files[0].simplified().endsWith(".iso"));
if(action==0){ BurnImgToUSB(); } //Go ahead and launch the burn dialog right away
}
diff --git a/src-qt5/desktop-utils/lumina-archiver/imgDialog.cpp b/src-qt5/desktop-utils/lumina-archiver/imgDialog.cpp
index 413c5fad..c353b751 100644
--- a/src-qt5/desktop-utils/lumina-archiver/imgDialog.cpp
+++ b/src-qt5/desktop-utils/lumina-archiver/imgDialog.cpp
@@ -18,7 +18,7 @@
imgDialog::imgDialog(QWidget *parent) : QDialog(parent), ui(new Ui::imgDialog()){
ui->setupUi(this); //load the designer form
- QString title = tr("Burn IMG to Device");
+ QString title = tr("Burn Disk Image to Device");
if( getuid()==0){ title.append(" ("+tr("Admin Mode")+")"); }
this->setWindowTitle(title);
ui->frame_running->setVisible(false);
@@ -107,7 +107,7 @@ void imgDialog::cancel(){
this->close();
}else{
//Prompt if the transfer should be cancelled
- if(QMessageBox::Yes == QMessageBox::question(this, tr("Cancel Image Burn?"), tr("Do you wish to stop the current IMG burn process?")+"\n\n"+tr("Warning: This will leave the USB device in an inconsistent state")) ){
+ if(QMessageBox::Yes == QMessageBox::question(this, tr("Cancel Image Burn?"), tr("Do you wish to stop the current disk image burn process?")+"\n\n"+tr("Warning: This will leave the USB device in an inconsistent state")) ){
ddProc->kill();
}
}
@@ -175,7 +175,7 @@ void imgDialog::procFinished(){
QMessageBox::warning(this, tr("ERROR"), tr("The process could not be completed:")+"\n\n"+lastmsg);
}
}else{
- QMessageBox::information(this, tr("SUCCESS"), tr("The image was successfully burned to the USB device") );
+ QMessageBox::information(this, tr("SUCCESS"), tr("The image was successfully burned to the device") );
this->close();
}
}
diff --git a/src-qt5/desktop-utils/lumina-pdf/PrintWidget.cpp b/src-qt5/desktop-utils/lumina-pdf/PrintWidget.cpp
index f64106d3..d6597705 100644
--- a/src-qt5/desktop-utils/lumina-pdf/PrintWidget.cpp
+++ b/src-qt5/desktop-utils/lumina-pdf/PrintWidget.cpp
@@ -129,12 +129,16 @@ void PrintWidget::setCurrentPage(int pageNumber) {
this->centerOn(pages.at(curPage-1));
}
}
+
+ //qDebug() << "Page Set";
}
void PrintWidget::highlightText(TextData *text) {
//Creates a rectangle around the text if the text has not already been highlighted
+ //qDebug() << "Page:" << text->page() << "Loc:" << text->loc();
if(!text->highlighted() && !text->loc().isNull()) {
int degrees = BACKEND->rotatedDegrees();
+ //qDebug() << "Degrees:" << degrees;
//Shows the text's location on a non-rotated page
QRectF rect = text->loc();
//Rotates the rectangle by the page's center and gets the right calculation for text's new location
@@ -154,12 +158,18 @@ void PrintWidget::highlightText(TextData *text) {
else
rect.adjust(cy, cx, cy, cx);
}
+
+ //qDebug() << "Post Degrees:" << rect;
//Moves the rectangle onto the right page
double pageHeight = 0;
for(int i = 0; i < text->page() - 1; i++)
pageHeight += pages.at(i)->boundingRect().height();
+ //qDebug() << "PageHeight:" << pageHeight;
+
rect.moveTop(rect.y() + pageHeight);
+
+ //qDebug() << "Final Rect:" << rect;
//Transparent yellow for the highlight box
QBrush highlightFill(QColor(255, 255, 177, 100));
QPen highlightOutline(QColor(255, 255, 100, 125));
@@ -388,6 +398,7 @@ void PrintWidget::fit(bool doFitting) {
}
void PrintWidget::goToPosition(int pagenum, float x, float y) {
+ //qDebug() << "Page:" << pagenum << "X:" << x << "Y:" << y;
setCurrentPage(pagenum);
QScrollBar *hsc = this->horizontalScrollBar();
@@ -398,9 +409,13 @@ void PrintWidget::goToPosition(int pagenum, float x, float y) {
double realHeight = pages.at(pagenum-1)->boundingRect().height();
double virtualHeight = qAbs(pt2.y() - pt.y());
+ //qDebug() << "Real:" << realHeight << "Virtual:" << virtualHeight;
+
int yConv = int(pt.y() + y*(virtualHeight/realHeight)) - 30;
int xConv = int(pt.x() + x*(virtualHeight/realHeight)) - 30;
+ //qDebug() << "newX:" << xConv << "newY:" << yConv;
+
if(yConv > vsc->maximum())
vsc->triggerAction(QAbstractSlider::SliderToMaximum);
else if(y != 0)
diff --git a/src-qt5/desktop-utils/lumina-pdf/PrintWidget.h b/src-qt5/desktop-utils/lumina-pdf/PrintWidget.h
index c353cb84..8e365a99 100644
--- a/src-qt5/desktop-utils/lumina-pdf/PrintWidget.h
+++ b/src-qt5/desktop-utils/lumina-pdf/PrintWidget.h
@@ -298,7 +298,7 @@ protected:
if(PageItem *page = dynamic_cast<PageItem*>(item))
linkList = page->childItems();
- else
+ else if(item != dynamic_cast<QGraphicsRectItem*>(item))
linkList = item->parentItem()->childItems();
if(LinkItem *link = dynamic_cast<LinkItem*>(item)){
diff --git a/src-qt5/desktop-utils/lumina-pdf/Renderer-mupdf.cpp b/src-qt5/desktop-utils/lumina-pdf/Renderer-mupdf.cpp
index a52fd5b4..7d5e1f64 100644
--- a/src-qt5/desktop-utils/lumina-pdf/Renderer-mupdf.cpp
+++ b/src-qt5/desktop-utils/lumina-pdf/Renderer-mupdf.cpp
@@ -65,6 +65,7 @@ class Data {
fz_context* getContext() { return ctx; }
fz_display_list* getDisplayList() { return list; }
QRectF getScaledRect() { return convertRect(bbox, sf); }
+ QRectF getScaledRect(fz_rect &rect) { return convertRect(rect, sf); }
fz_rect getBoundingBox() { return bbox; }
fz_matrix getMatrix() { return ctm; }
QImage getImage() { return img; }
@@ -144,7 +145,7 @@ Renderer::Renderer(){
locks.unlock = unlock_mutex;
DOC = 0;
- qDebug() << "Creating Context";
+ //qDebug() << "Creating Context";
CTX = fz_new_context(NULL, &locks, FZ_STORE_UNLIMITED);
needpass = false;
degrees = 0;
@@ -152,7 +153,7 @@ Renderer::Renderer(){
Renderer::~Renderer(){
//pdf_clean_page_contents
- qDebug() << "Dropping Context";
+ //qDebug() << "Dropping Context";
clearHash();
fz_drop_document(CTX, DOC);
DOC = NULL;
@@ -216,7 +217,7 @@ bool Renderer::loadDocument(QString path, QString password){
docpath = path;
DOC = fz_open_document(CTX, path.toLocal8Bit().data());
- qDebug() << "File opened" << DOC;
+ //qDebug() << "File opened" << DOC;
if(DOC==0){
qDebug() << "Could not open file:" << path;
return false;
@@ -230,13 +231,13 @@ bool Renderer::loadDocument(QString path, QString password){
if(needpass){ return false; } //incorrect password
}
- qDebug() << "Password Check cleared";
+ //qDebug() << "Password Check cleared";
pnum = fz_count_pages(CTX, DOC);
qDebug() << "Page count: " << pnum;
doctitle.clear();
- qDebug() << "Opening File:" << path;
+ //qDebug() << "Opening File:" << path;
jobj.insert("subject", getTextInfo("Subject") );
jobj.insert("author", getTextInfo("Author") );
jobj.insert("creator", getTextInfo("Creator") );
@@ -255,8 +256,8 @@ bool Renderer::loadDocument(QString path, QString password){
fz_outline *outline = fz_load_outline(CTX, DOC);
if(outline)
traverseOutline(outline, 0);
- else
- qDebug() << "No Bookmarks";
+ //else
+ //qDebug() << "No Bookmarks";
fz_drop_outline(CTX, outline);
@@ -555,7 +556,7 @@ QList<TextData*> Renderer::searchDocument(QString text, bool matchCase){
int count = fz_search_display_list(CTX, dataHash[i]->getDisplayList(), text.toLocal8Bit().data(), rectBuffer, 1000);
//qDebug() << "Page " << i+1 << ": Count, " << count;
for(int j = 0; j < count; j++) {
- TextData *t = new TextData(dataHash[i]->getScaledRect(), i+1, text);
+ TextData *t = new TextData(dataHash[i]->getScaledRect(rectBuffer[j]), i+1, text);
//MuPDF search does not match case, so retrieve the exact text at the location found and determine whether or not it matches the case of the search text if the user selected to match case
if(matchCase){
fz_stext_page *sPage = fz_new_stext_page_from_display_list(CTX, dataHash[i]->getDisplayList(), NULL);
diff --git a/src-qt5/desktop-utils/lumina-pdf/mainUI.cpp b/src-qt5/desktop-utils/lumina-pdf/mainUI.cpp
index f0b64948..b44cd8f2 100644
--- a/src-qt5/desktop-utils/lumina-pdf/mainUI.cpp
+++ b/src-qt5/desktop-utils/lumina-pdf/mainUI.cpp
@@ -355,7 +355,7 @@ void MainUI::endPresentation(){
}
void MainUI::startLoadingPages(int degrees){
- qDebug() <<"Start Loading Pages";
+ //qDebug() <<"Start Loading Pages";
//if(BACKEND->hashSize() != 0) { return; } //currently loaded[ing]
loadingQueue.clear();
BACKEND->clearHash();
@@ -420,7 +420,7 @@ void MainUI::paintToPrinter(QPrinter *PRINTER){
int copies = PRINTER->copyCount();
bool collate = PRINTER->collateCopies();
bool reverse = (PRINTER->pageOrder()==QPrinter::LastPageFirst);
- qDebug() << "PRINTER DPI:" << PRINTER->resolution() << PRINTER->supportedResolutions();
+ //qDebug() << "PRINTER DPI:" << PRINTER->resolution() << PRINTER->supportedResolutions();
if(PRINTER->resolution() < 300){
//Try to get 300 DPI resolution at least
PRINTER->setResolution(300);
@@ -632,10 +632,11 @@ void MainUI::find(QString text, bool forward) {
TextData *currentText = results[currentHighlight];
- if(BACKEND->supportsExtraFeatures())
+ if(BACKEND->supportsExtraFeatures()) {
WIDGET->highlightText(currentText);
- }else{
- ui->resultsLabel->setText("No results found");
+ }else{
+ ui->resultsLabel->setText("No results found");
+ }
}
}
}
diff --git a/src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp b/src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp
index 48a4ceb4..97042f9c 100644
--- a/src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp
+++ b/src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp
@@ -22,7 +22,6 @@ MainUI::MainUI()
IMG = new ImageEditor(this);
ui->scrollArea->setWidget(IMG);
areaOverlay = 0;
- ppath = QDir::homePath();
ui->label_zoom_percent->setMinimumWidth( ui->label_zoom_percent->fontMetrics().width("200%") );
setupIcons();
ui->spin_monitor->setMaximum(QApplication::desktop()->screenCount());
@@ -60,6 +59,7 @@ MainUI::MainUI()
connect(tabbar, SIGNAL(currentChanged(int)), this, SLOT(tabChanged(int)) );
connect(ui->check_show_popups, SIGNAL(toggled(bool)), this, SLOT(showPopupsChanged(bool)) );
settings = LUtils::openSettings("lumina-desktop", "lumina-screenshot",this);
+ ppath = settings->value("previous-path", QDir::homePath()).toString();
QString opt = settings->value("screenshot-target", "window").toString();
if( opt == "window") {ui->radio_window->setChecked(true); }
else if(opt=="area"){ ui->radio_area->setChecked(true); }
@@ -129,6 +129,7 @@ void MainUI::saveScreenshot(){
}else{
picSaved = true;
ppath = filepath.section("/",0,-2); //just the directory
+ settings->setValue("previous-path", ppath);
if (closeOnSave) {
// We came here from close, now we need to close *after* handling
// the current screen event.
diff --git a/src-qt5/desktop-utils/lumina-textedit/MainUI.cpp b/src-qt5/desktop-utils/lumina-textedit/MainUI.cpp
index bc08e521..298fedde 100644
--- a/src-qt5/desktop-utils/lumina-textedit/MainUI.cpp
+++ b/src-qt5/desktop-utils/lumina-textedit/MainUI.cpp
@@ -277,7 +277,7 @@ void MainUI::OpenFile(QString file){
edit->document()->setDefaultFont(font);
/*QStringList applicationDirs = LXDG::systemApplicationDirs();*/
if(ui->actionEnable_Spellcheck->isChecked()) {
- QStringList dirs = QString(getenv("XDG_DATA_DIRS")).split(":");
+ /*QStringList dirs = QString(getenv("XDG_DATA_DIRS")).split(":");
foreach(QString dir, dirs) {
if(QDir(dir).exists("hunspell")) {
//Default to US English Dictionary
@@ -285,7 +285,7 @@ void MainUI::OpenFile(QString file){
hunspell = new Hunspell(QString(hunspellPath + "en_US.aff").toLocal8Bit(), QString(hunspellPath + "en_US.dic").toLocal8Bit());
edit->setDictionary(hunspell);
}
- }
+ }*/
}
}
tabWidget->setCurrentWidget(edit);
@@ -413,7 +413,7 @@ void MainUI::ModifyColors(){
}
void MainUI::SetLanguage() {
- QDir dir(hunspellPath);
+ /*QDir dir(hunspellPath);
QStringList files = dir.entryList(QStringList() << "*.dic", QDir::Files);
QStringList items;
int defaultDic = 0;
@@ -431,7 +431,7 @@ void MainUI::SetLanguage() {
hunspell = new Hunspell(QString(hunspellPath+dic+".aff").toLocal8Bit(), QString(hunspellPath+dic+".dic").toLocal8Bit());
- checkSpelling(-1);
+ checkSpelling(-1);*/
}
void MainUI::showPopupWarnings(bool show){
@@ -439,13 +439,13 @@ void MainUI::showPopupWarnings(bool show){
}
void MainUI::enableSpellcheck(bool show){
- qDebug() << "Enabling Spellcheck";
+ /*qDebug() << "Enabling Spellcheck";
settings->setValue("enableSpellcheck",show);
if(currentEditor() != NULL and hunspell == NULL) {
- /*QStringList applicationDirs = LXDG::systemApplicationDirs();*/
+ //QStringList applicationDirs = LXDG::systemApplicationDirs();
hunspell = new Hunspell(QString(hunspellPath + "en_US.aff").toLocal8Bit(), QString(hunspellPath + "en_US.dic").toLocal8Bit());
qDebug() << "Hunspell Created";
- }
+ }*/
}
void MainUI::showToolbar(bool show){
@@ -621,22 +621,30 @@ PlainTextEditor *cur = currentEditor();
}
void MainUI::checkWord(QTextBlock block) {
- PlainTextEditor *cur = currentEditor();
+ /*PlainTextEditor *cur = currentEditor();
if(cur==0){ return; }
+ if(block.text().simplified().isEmpty()){ return; }
foreach(Word *word, wordList) {
- if(word->blockNum == block.blockNumber())
+ if(word->blockNum == block.blockNumber()){
+ qDebug() << "Remove Word";
wordList.removeOne(word);
+ }
}
QStringList words = block.text().split(QRegExp("\\W+"));
+ qDebug() << "Got Words:" << words;
QTextCursor cursor(block);
foreach(QString word, words) {
+ qDebug() << "Check Word:" << word;
if(!hunspell->spell(word.toStdString())) {
- QList<QString> suggestions;
- foreach(std::string newWord, hunspell->suggest(word.toStdString()))
+ qDebug() << "Not a word";
+ QStringList suggestions;
+ foreach(std::string newWord, hunspell->suggest(word.toStdString())){
suggestions.append(QString::fromStdString(newWord));
+ }
+ qDebug() << "Got Suggestions:" << suggestions;
QTextEdit::ExtraSelection sel;
sel.format.setBackground(QColor("Red"));
sel.cursor = cur->document()->find(word, cursor.position());
@@ -644,27 +652,31 @@ void MainUI::checkWord(QTextBlock block) {
wordList.append(wordC);
}
cursor.movePosition(QTextCursor::NextWord, QTextCursor::MoveAnchor);
- }
+ }*/
}
void MainUI::checkSpelling(int bpos, int epos) {
- //qDebug() << "Checking spelling on";
+ qDebug() << "Checking spelling on" << bpos << epos;
PlainTextEditor *cur = currentEditor();
if(cur==0){ return; }
static int numBlocks = cur->blockCount();
-
- if(bpos == -1 or numBlocks != cur->blockCount()) { //When opening a file or loading a new dictionary
- for(QTextBlock block = cur->document()->begin(); block != cur->document()->end(); block = block.next())
+ //qDebug() << " - numblocks:" << numBlocks;
+ if(bpos == -1 || numBlocks != cur->blockCount()) { //When opening a file or loading a new dictionary
+ for(QTextBlock block = cur->document()->begin(); block != cur->document()->end(); block = block.next()){
+ //qDebug() << " - Check Block:" << block.text();
checkWord(block);
+ }
numBlocks = cur->blockCount();
}else if(epos == -1){ //Normal checking of one block from typing
QTextBlock block = cur->document()->findBlock(bpos);
+ //qDebug() << " - Check Block:" << block.text();
checkWord(block);
}else { //Check blocks after copy/paste
for(QTextBlock block = cur->document()->findBlock(0); block != cur->document()->findBlock(epos); block = block.next()) {
checkWord(block);
}
}
+ //qDebug() << " - set Word List:" << wordList;
cur->setWordList(wordList);
}
diff --git a/src-qt5/desktop-utils/lumina-textedit/MainUI.h b/src-qt5/desktop-utils/lumina-textedit/MainUI.h
index 90222cb3..38a742dd 100644
--- a/src-qt5/desktop-utils/lumina-textedit/MainUI.h
+++ b/src-qt5/desktop-utils/lumina-textedit/MainUI.h
@@ -21,7 +21,7 @@
#include "DnDTabBar.h"
#include "Word.h"
-#include <hunspell/hunspell.hxx>
+//#include <hunspell/hunspell.hxx>
namespace Ui{
class MainUI;
@@ -46,16 +46,16 @@ private:
QShortcut *closeFindS, *nextTabS, *prevTabS;
QSpinBox *fontSizes;
QAction *label_readonly;
- Hunspell *hunspell;
- QList<Word*> wordList;
- QString hunspellPath;
+ //Hunspell *hunspell;
+ QList<Word*> wordList;
+ QString hunspellPath;
//Simplification functions
PlainTextEditor* currentEditor();
- QString currentFile();
+ QString currentFile();
QString currentFileDir();
QStringList unsavedFiles();
- void checkWord(QTextBlock);
+ void checkWord(QTextBlock);
private slots:
//Main Actions
@@ -70,8 +70,8 @@ private slots:
void updateStatusTip();
void changeFontSize(int newFontSize);
void changeTabsLocation(QAction*);
- void checkSpelling(int bpos, int epos = -1);
- void SetLanguage();
+ void checkSpelling(int bpos, int epos = -1);
+ void SetLanguage();
//Other Menu Actions
void UpdateHighlighting(QAction *act = 0);
@@ -88,8 +88,8 @@ private slots:
void tabClosed(int);
void tabDetached(int);
void tabDraggedOut(int, Qt::DropAction);
- void nextTab();
- void prevTab();
+ void nextTab();
+ void prevTab();
//Find/Replace functions
void closeFindReplace();
diff --git a/src-qt5/desktop-utils/lumina-textedit/PlainTextEditor.cpp b/src-qt5/desktop-utils/lumina-textedit/PlainTextEditor.cpp
index d1f29974..07b99f27 100644
--- a/src-qt5/desktop-utils/lumina-textedit/PlainTextEditor.cpp
+++ b/src-qt5/desktop-utils/lumina-textedit/PlainTextEditor.cpp
@@ -291,7 +291,6 @@ void PlainTextEditor::LNW_updateWidth(){
void PlainTextEditor::LNW_highlightLine(){
QList<QTextEdit::ExtraSelection> sels;
-
foreach(Word *word, wordList) { sels.append(word->sel); };
if(this->isReadOnly()){ return; }
QColor highC = QColor(0,0,0,50); //just darken the line a bit
diff --git a/src-qt5/desktop-utils/lumina-textedit/PlainTextEditor.h b/src-qt5/desktop-utils/lumina-textedit/PlainTextEditor.h
index 8ca8037d..8f174d4b 100644
--- a/src-qt5/desktop-utils/lumina-textedit/PlainTextEditor.h
+++ b/src-qt5/desktop-utils/lumina-textedit/PlainTextEditor.h
@@ -13,7 +13,7 @@
#include <QPaintEvent>
#include <QFileSystemWatcher>
-#include <hunspell/hunspell.hxx>
+//#include <hunspell/hunspell.hxx>
#include "syntaxSupport.h"
#include "Word.h"
@@ -34,7 +34,7 @@ public:
void LoadFile(QString filepath);
bool SaveFile(bool newname = false);
QString currentFile();
- Word *wordAtPosition(int, int);
+ Word *wordAtPosition(int, int);
bool hasChange();
bool readOnlyFile();
@@ -43,10 +43,10 @@ public:
int LNWWidth(); //replacing the LNW size hint detection
void paintLNW(QPaintEvent *ev); //forwarded from the LNW paint event
void updateLNW();
- void setWordList(QList<Word*> _wordList) { wordList = _wordList; }
- void setDictionary(Hunspell *_hunspell) { hunspell = _hunspell; }
+ void setWordList(QList<Word*> _wordList) { wordList = _wordList; }
+ //void setDictionary(Hunspell *_hunspell) { hunspell = _hunspell; }
- QFontMetrics *metrics;
+ QFontMetrics *metrics;
private:
QWidget *LNW; //Line Number Widget
@@ -54,10 +54,10 @@ private:
QSettings *settings;
QString lastSaveContents;
QFileSystemWatcher *watcher;
- QList<Word*> wordList;
+ QList<Word*> wordList;
//Syntax Highlighting class
Custom_Syntax *SYNTAX;
- Hunspell *hunspell;
+ //Hunspell *hunspell;
//Bracket/Perentheses matching functions
int matchleft, matchright; //positions within the document
diff --git a/src-qt5/desktop-utils/lumina-textedit/lumina-textedit.pro b/src-qt5/desktop-utils/lumina-textedit/lumina-textedit.pro
index 5ebbd9d0..a69fc0c2 100644
--- a/src-qt5/desktop-utils/lumina-textedit/lumina-textedit.pro
+++ b/src-qt5/desktop-utils/lumina-textedit/lumina-textedit.pro
@@ -27,7 +27,7 @@ SOURCES += main.cpp \
FORMS += MainUI.ui \
ColorDialog.ui
-LIBS += -lhunspell-1.6
+#LIBS += -lhunspell-1.6
TRANSLATIONS = i18n/l-te_af.ts \
i18n/l-te_ar.ts \
diff --git a/src-qt5/desktop-utils/lumina-textedit/syntax_rules/md.syntax b/src-qt5/desktop-utils/lumina-textedit/syntax_rules/md.syntax
index 3cd0a7b6..a8e740a0 100644
--- a/src-qt5/desktop-utils/lumina-textedit/syntax_rules/md.syntax
+++ b/src-qt5/desktop-utils/lumina-textedit/syntax_rules/md.syntax
@@ -22,39 +22,39 @@
},
{
"name": "bold and italic",
- "regex" : "[\\*]{3}(?!\\s)[^\\*\\_]+(?!\\s)[\\*]{3}",
+ "regex" : "(\\s|^)[[\\*]{3}(?!\\s)[^\\*\\_]+(?!\\s)[\\*]{3}(\\s|$)",
"foreground": "colors/altkeyword",
"font_weight" : "bold",
"font_style" : "italic"
},
{
"name": "bold",
- "regex" : "[\\*]{2}(?!\\s)[^\\*\\_]+(?!\\s)[\\*]{2}",
+ "regex" : "(\\s|^)[\\*]{2}(?!\\s)[^\\*\\_]+(?!\\s)[\\*]{2}(\\s|$)",
"foreground": "colors/altkeyword",
"font_weight" : "bold"
},
{
"name": "italic",
- "regex" : "[\\*](?!\\s){1}[^\\*\\_]+(?!\\s)[\\*]{1}",
+ "regex" : "(\\s|^)[\\*](?!\\s){1}[^\\*\\_]+(?!\\s)[\\*]{1}(\\s|$)",
"foreground": "colors/altkeyword",
"font_style" : "italic"
},
{
"name": "bold and italic",
- "regex" : "[_]{3}(?!\\s)[^\\*\\_]+(?!\\s)[_]{3}",
+ "regex" : "(\\s|^)[_]{3}(?!\\s)[^\\*\\_]+(?!\\s)[_]{3}(\\s|$)",
"foreground": "colors/altkeyword",
"font_weight" : "bold",
"font_style" : "italic"
},
{
"name": "bold",
- "regex" : "[_]{2}(?!\\s)[^\\*\\_]+(?!\\s)[_]{2}",
+ "regex" : "(\\s|^)[_]{2}(?!\\s)[^\\*\\_]+(?!\\s)[_]{2}(\\s|$)",
"foreground": "colors/altkeyword",
"font_weight" : "bold"
},
{
"name": "italic",
- "regex" : "[_]{1}(?!\\s)[^\\*\\_]+(?!\\s)[_]{1}",
+ "regex" : "(\\s|^)[_]{1}(?!\\s)[^\\*\\_]+(?!\\s)[_]{1}(\\s|$)",
"foreground": "colors/altkeyword",
"font_style" : "italic"
},
bgstack15