Skip to content

Re-enable search highlighting#1096

Merged
vadi2 merged 19 commits intoMudlet:developmentfrom
tomcss:development
Jul 2, 2017
Merged

Re-enable search highlighting#1096
vadi2 merged 19 commits intoMudlet:developmentfrom
tomcss:development

Conversation

@tomcss
Copy link
Copy Markdown
Contributor

@tomcss tomcss commented Jun 14, 2017

The edbee search selection turning the editor readonly.

I had originally replaced all the calls to set the readonly for the old editor to edbee, because I didn't know for each one why it had to be set to readonly there. I commented this one out for now. I can't actually work out any reason why the editor would be set to readonly.

Apologies for the repeated comment and code - there's a lot of code repetition in dlgTriggerEditor which I want to have a look at.

This fix will elect all search instances now instead of one. It will select them on clicking any search result, but not when doing the initial search.

@SlySven SlySven requested review from SlySven and vadi2 June 14, 2017 20:45
{
// Edbee doesn't have a readonly option, so I'm using setEnabled
mpSourceEditorEdbee->setEnabled(false);
// mpSourceEditorEdbee->setEnabled(false);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some times the editor displays stuff that should not be edited like module names or is not something that can have anything inserted, like lua functions or tables in the "variable" view.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, thanks

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to undo this change

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🕦 OK I was slow to get my approval in - Vadim's override was okay in this case... 😉

@vadi2 vadi2 self-assigned this Jun 16, 2017
@vadi2
Copy link
Copy Markdown
Member

vadi2 commented Jun 17, 2017

This is dragging the snapcraft file from my branch in (@tomcss Merge branch 'add-snapcraft' of https://github.com/tomcss/Mudlet 23113b4) which isn't ready to go, could you add a commit deleting it?

@tomcss
Copy link
Copy Markdown
Contributor Author

tomcss commented Jun 19, 2017

I had deleted the file from my other branch but not development. I'll get the hang of this some day.

Copy link
Copy Markdown
Member

@vadi2 vadi2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks OK to me and fixes the regression that we gained with switching to edbee. Just need to re-enable disabling editing on things that can't be edited

{
// Edbee doesn't have a readonly option, so I'm using setEnabled
mpSourceEditorEdbee->setEnabled(false);
// mpSourceEditorEdbee->setEnabled(false);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to undo this change

@vadi2 vadi2 assigned tomcss and unassigned vadi2 Jun 20, 2017
@vadi2 vadi2 added this to the 3.3 milestone Jun 21, 2017
@vadi2 vadi2 assigned SlySven and unassigned tomcss Jun 25, 2017
@vadi2
Copy link
Copy Markdown
Member

vadi2 commented Jun 26, 2017

edbee gained the ability to highlight search results without selecting them, which I think will address the issue @tomcss has with selecting all search results - and it'll bring edbee in line with current Mudlet behaviour.

I've asked @tomcss in Discord if he's interested in updating it for these changes but didn't get a response so I'll look into updating the code for that.

@vadi2 vadi2 assigned vadi2 and unassigned SlySven and vadi2 Jun 26, 2017
@vadi2 vadi2 changed the title Edbee changes Re-enable search highlighting Jun 29, 2017
@vadi2
Copy link
Copy Markdown
Member

vadi2 commented Jun 30, 2017

I've updated this PR to use edbee's new search highlight functionality - this restores the previous behaviour we had in 3.2 where search terms were highlighted but not selected.

@vadi2 vadi2 assigned SlySven and unassigned tomcss Jun 30, 2017
@itsTheFae
Copy link
Copy Markdown
Contributor

We fixed this issue (#1157) in PR #1159 this wont cause regressions if it is merged now?

@vadi2
Copy link
Copy Markdown
Member

vadi2 commented Jul 2, 2017

This is a different one - edbee before did not have a way to highlight search results, so we made it select all of them instead. It can highlight now - so this goes back to 3.2 functionality of highlighting all search results.

@vadi2
Copy link
Copy Markdown
Member

vadi2 commented Jul 2, 2017

@SlySven's concern has been addressed for a while now - Stephen I'll dissmiss your review in order to get this PR into 3.3.

@vadi2 vadi2 dismissed SlySven’s stale review July 2, 2017 04:07

Concern addressed for a while and this needs to be in 3.3

@vadi2 vadi2 merged commit 4f5061b into Mudlet:development Jul 2, 2017
@SlySven
Copy link
Copy Markdown
Member

SlySven commented Jul 2, 2017

I've been up all night picking around on this one and I have some things that relate but perhaps do not invalidate this - which is just as well as I have missed the boat:

  • The search code does highlight with an outline around the found items in the editor window - which emulates the old editor behaviour - but we do not seem to have a way to clear them should that be wanted... I have just raised this upstream How does one undo the effect of edbee::TextSearcher::markAll(...) ? edbee/edbee-lib#40 - hoping the resolution is fairly straight-forwards but it is not obvious to me... 😞
  • The Searching is still case insensitive and given that Lua is case-sensitive this is not helpful - I have a fix (a second button alongside the "tri-angle" one that defaults to case insensitive but can be clicked to change this) - it appears to work...
  • No means to clear the search results (and remove the outlining in the first point) - was working on this...

screenshot_20170702_061219

@vadi2
Copy link
Copy Markdown
Member

vadi2 commented Jul 2, 2017

Searching was case-insensitive and there was no way to clear it in 3.2 as well - it's nothing new, so we'll add these new features in 3.4 when you're ready with them 😬

@vadi2
Copy link
Copy Markdown
Member

vadi2 commented Jul 2, 2017

Should've mentioned that you were up busy working on it though... I did say in the release channel that I'll merge all outstanding PRs last night, and I waited until this morning to merge. Sorry :(

vadi2 pushed a commit that referenced this pull request Jul 2, 2017
@SlySven
Copy link
Copy Markdown
Member

SlySven commented Jul 2, 2017

No worries... 🙂

SlySven added a commit to SlySven/Mudlet that referenced this pull request Jul 11, 2017
Following on from Mudlet#1096 I realised
that the search capability was still not case sensitive and given that Lua
is a case preserving language this struck me as a nuisance.  It is now
possible to configure this feature when searching with a button that
displays three line of letters "ABCD"/"AbCd"/"abcd" with all three lines
highlighted when searches are not case sensitive (i.e. a search for "A"
will also find "a") and only the middle line when the case does matter
(i.e. a search for "A" will not find the lower case one).

As we now have "boarder-outlines" around all the instances found in an
element in a lua script component, we ought to have a means to removed them
afterwards without having to click on another item and then return to the
current one being considered.  This commit also adds a clear button
to both clear the treeWidget_searchResults but also to remove those border
outlines.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
SlySven added a commit that referenced this pull request Jul 23, 2017
…1218)

* Enhance: make editor search have optional case-sensitivity and clear

Following on from #1096 I realised
that the search capability was still not case sensitive and given that Lua
is a case preserving language this struck me as a nuisance.  It is now
possible to configure this feature when searching.

As we now have "boarder-outlines" around all the instances found in an
element in a lua script component, we ought to have a means to removed them
afterwards without having to click on another item and then return to the
current one being considered.  This commit also adds the built in clear
button in the QLineEdit of the QComboBox that the search term is entered
into which also clears the treeWidget_searchResults and also remove
those border outlines.

Clicking on a result in the search tree widget should put the focus (and
the cursor) on the first (or selected term depending on case) within item.

Moved several methods in dlgTriggerEditor from being declared as SLOTs when
they are not so used:
* (void) recursiveSearchTriggers(TTrigger*, const QString&)
* (void) recursiveSearchAlias(TAlias*, const QString&)
* (void) recursiveSearchScripts(TScript*, const QString&)
* (void) recursiveSearchActions(TAction*, const QString&)
* (void) recursiveSearchTimers(TTimer*, const QString&)
* (void) recursiveSearchKeys(TKey*, const QString&)

In that class I also renamed:
* (void) recurseVariablesDown(TVar*, QList<TVar*>&, bool)
                   ==> recursiveSearchVariables(TVar*, QList<TVar*>&, bool)
because it had the same name as another function with a different signature
but it is used in the same manner as the previously mentioned no longer
SLOT methods.

Also renamed in the same class was:
* (void) slot_search_triggers(const QString)
                                 ==> slot_searchMudletItems(const QString&)
because it is now used to search all item types not just "Triggers" as it
may once have done!

I added a couple of enums to the same class, both for use with the search
functionality which this commit extends, the first is used to categorise
the data elements that are stored in the first item in each row of the
search results tree widget and the second (used as one type of the first)
to identify which part of a particular "item" the search result relates to
and thus how to process the stored data to goto the correct part of the
editor display when/if that result is selected by the user.

Elements were also renamed to try and be a bit more consistent across the
different Mudlet "item" types:

In "aliases" form/dialog:
* (QLineEdit *) pattern_textedit ==> lineEdit_alias_pattern
* (QComboBox *) comboBox ==> comboBox_alias_regex
* (QLineEdit *) substitution ==> lineEdit_alias_command

In "actions" (buttons/menus/toolbars) form/dialog:
* (QCheckBox *) checkBox_pushdownbutton
                                      ==> checkBox_action_button_isPushDown
* (QLineEdit *) lineEdit_command_down
                                    ==> lineEdit_action_button_command_down
* (QLineEdit *) lineEdit_command_up ==> lineEdit_action_button_command_up
* (QSpinBox *) buttonColumns ==> spinBox_action_bar_columns
* (QPlainTextEdit *) css ==> plainTextEdit_action_css
* (QComboBox *) comboBox_location ==> comboBox_action_bar_location
* (QComboBox *) comboBox_orientation ==> comboBox_action_bar_orientation
* (QComboBox *) buttonRotation ==> comboBox_action_button_rotation
* (QLabel *) label_command_down ==> label_action_button_command_down
* (QLabel *) label_command_up ==> label_action_button_command_up

In "keys" form/dialog:
* (QPushButton *) pushButton_grabKey ==> pushButton_key_grabKey
* (QLineEdit *) lineEdit_command ==> lineEdit_key_command
* (QLineEdit *) lineEdit_name ==> lineEdit_key_name
* (QLineEdit *) lineEdit_key ==> lineEdit_key_binding

In "scripts" form/dialog:
* (QLineEdit *) lineEdit ==> lineEdit_script_event_handler_entry
* (QListWidget *) listWidget_registered_event_handlers
                            ==> listWidget_script_registered_event_handlers
* (QToolButton *) toolButton_add ==> toolButton_script_add_event_handler
* (QToolButton *) toolButton_remove
                                  ==> toolButton_script_remove_even_handler

In "timer" form/dialog:
* (QLineEdit *) lineEdit_command ==> lineEdit_timer_command
* (QTimeEdit *) timeEdit_hours ==> timeEdit_timer_hours
* (QTimeEdit *) timeEdit_minutes ==> timeEdit_timer_minutes
* (QTimeEdit *) timeEdit_seconds ==> timeEdit_timer_seconds
* (QTimeEdit *) timeEdit_msecs ==> timeEdit_timer_msecs

In "trigger pattern" form/dialog:
* (QComboBox) patternType ==> comboBox_patternType
* (QPushButton) fgB ==> pushButton_fgColor
* (QPushButton) bgB ==> pushButton_bgColor
* (QLabel) number ==> label_patternNumber

In "variables" form/dialog:
* (QCheckBox *) hideVariable ==> checkBox_variable_hidden
* (QComboBox *) key_type ==> comboBox_variable_key_type
* (QComboBox *) var_type ==> comboBox_variable_value_type

Note that in the above SOME other elements that are not used in a
programmatic way (e.g. some label identifiers or layout or container
type widgets) have also been renamed in a similar way.

Also:
* The layout of the Timer editor has been "improved" and also now reports
the milli-seconds in "zzz" format rather than "z" so that it is more
obvious that the number is thousandths of a second and can range from "000"
to "999".
* The patterns in the trigger part of the editor are now numbered in a
more human-friendly 1 to 50 instead of the previous 0 to 49.
* When a different trigger is selected the pattern widget is scrolled so
that the highest used pattern number is in view.
* The search process now also searches: the "name" field for all items and
where relevant the "command" fields of "actions", "aliases", "keys",
"timers" and "triggers" {including the "command (up)}" for "buttons" and
the "Css"/"Stylesheet" field for "buttons"/"menus"/"buttons" and the
"Events handled" for "Scripts" and the "pattern" field for "aliases".
* Searching on fields that are multi-line (the Lua scripts for all but
"variables"; the "Css/Stylesheet" for "buttons"/"menus"/"buttons") or
multi-element ("trigger" patterns) indicate the line/column of the start
of the search term or pattern number respectively in the "What" column of
the search results.

A tweak has been included that disables some items on the key and value
QComboBoxs in the "Variable" part of the editor, this uses a means
documented in https://stackoverflow.com/a/21376774/4805858
to replace the "standard" data model for the QComboBox with one from the
QListWidget which allows individual items to be flagged as disabled - which
the standard QComboBox does not.

This is designed to, in conjunction with a refactoring of code in
dlgTriggerEditor::slot_var_selected(...) to prevent invalid choices to be
made by the user (so types that they cannot enter through the Editor widget
but which are included in the type QComboBox s for display purposes:
functions for both and tables for one are disabled).

I would like to hide the editor widget when functions and tables are
selected in the tree widget - but that has proven to mess up the spacing
and layout for the remaining visible widgets and will have to be left until
I can bring: PR 436 "(release 30)bug fix get splitter working properly on
editor right side" into a usable state: #436

I have reordered all QGridLayout constructs in the "touched" dialog/forms in
strict ascending column & row (columns first) order - as Qt Form designer
does not currently enforce this but it increases Git noise in them.

Also have edited tooltip for hidden variable to match new form of hidden
variables control.

Part way through the evolution of this (squashed down to a single)
commit it was decided to revised the search to be an options menu
with space for additional options.

The mechanism now behaves very like the Qt Creator's own search options
which are presented as a clickable menu at the start of the search term
QLineEdit part of the editable QComboBox.

At present only Case Sensitivity is supported but it will be possible to
add additional search options - the most likely being whole word and
regular expression type searches. As the QtCreator inspiration does
different icons are shown depending on the options enabled on the menu
that is displayed is clicked (and encoded into the new enum/QFlags
"SearchOptions" which is stored in dlgTriggerEditor::mSearchOptions). As
new options are coded extra icons that support all the combinations will
be needed (although if a combination is not provided with an icon) the
grey binoculars icon that is used when no option is set is replaced with
a red one to indicate something is enabled and modifying the search
behaviour.

Also currently the options chosen are NOT stored against the search terms
that get stored into the search term QComboBox - it might be wanted to store
the search options chosen as part of each search term (use a item::data for
that) so they can be restore if an existing term is reused...

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
vadi2 pushed a commit that referenced this pull request Aug 6, 2017
…1218)

* Enhance: make editor search have optional case-sensitivity and clear

Following on from #1096 I realised
that the search capability was still not case sensitive and given that Lua
is a case preserving language this struck me as a nuisance.  It is now
possible to configure this feature when searching.

As we now have "boarder-outlines" around all the instances found in an
element in a lua script component, we ought to have a means to removed them
afterwards without having to click on another item and then return to the
current one being considered.  This commit also adds the built in clear
button in the QLineEdit of the QComboBox that the search term is entered
into which also clears the treeWidget_searchResults and also remove
those border outlines.

Clicking on a result in the search tree widget should put the focus (and
the cursor) on the first (or selected term depending on case) within item.

Moved several methods in dlgTriggerEditor from being declared as SLOTs when
they are not so used:
* (void) recursiveSearchTriggers(TTrigger*, const QString&)
* (void) recursiveSearchAlias(TAlias*, const QString&)
* (void) recursiveSearchScripts(TScript*, const QString&)
* (void) recursiveSearchActions(TAction*, const QString&)
* (void) recursiveSearchTimers(TTimer*, const QString&)
* (void) recursiveSearchKeys(TKey*, const QString&)

In that class I also renamed:
* (void) recurseVariablesDown(TVar*, QList<TVar*>&, bool)
                   ==> recursiveSearchVariables(TVar*, QList<TVar*>&, bool)
because it had the same name as another function with a different signature
but it is used in the same manner as the previously mentioned no longer
SLOT methods.

Also renamed in the same class was:
* (void) slot_search_triggers(const QString)
                                 ==> slot_searchMudletItems(const QString&)
because it is now used to search all item types not just "Triggers" as it
may once have done!

I added a couple of enums to the same class, both for use with the search
functionality which this commit extends, the first is used to categorise
the data elements that are stored in the first item in each row of the
search results tree widget and the second (used as one type of the first)
to identify which part of a particular "item" the search result relates to
and thus how to process the stored data to goto the correct part of the
editor display when/if that result is selected by the user.

Elements were also renamed to try and be a bit more consistent across the
different Mudlet "item" types:

In "aliases" form/dialog:
* (QLineEdit *) pattern_textedit ==> lineEdit_alias_pattern
* (QComboBox *) comboBox ==> comboBox_alias_regex
* (QLineEdit *) substitution ==> lineEdit_alias_command

In "actions" (buttons/menus/toolbars) form/dialog:
* (QCheckBox *) checkBox_pushdownbutton
                                      ==> checkBox_action_button_isPushDown
* (QLineEdit *) lineEdit_command_down
                                    ==> lineEdit_action_button_command_down
* (QLineEdit *) lineEdit_command_up ==> lineEdit_action_button_command_up
* (QSpinBox *) buttonColumns ==> spinBox_action_bar_columns
* (QPlainTextEdit *) css ==> plainTextEdit_action_css
* (QComboBox *) comboBox_location ==> comboBox_action_bar_location
* (QComboBox *) comboBox_orientation ==> comboBox_action_bar_orientation
* (QComboBox *) buttonRotation ==> comboBox_action_button_rotation
* (QLabel *) label_command_down ==> label_action_button_command_down
* (QLabel *) label_command_up ==> label_action_button_command_up

In "keys" form/dialog:
* (QPushButton *) pushButton_grabKey ==> pushButton_key_grabKey
* (QLineEdit *) lineEdit_command ==> lineEdit_key_command
* (QLineEdit *) lineEdit_name ==> lineEdit_key_name
* (QLineEdit *) lineEdit_key ==> lineEdit_key_binding

In "scripts" form/dialog:
* (QLineEdit *) lineEdit ==> lineEdit_script_event_handler_entry
* (QListWidget *) listWidget_registered_event_handlers
                            ==> listWidget_script_registered_event_handlers
* (QToolButton *) toolButton_add ==> toolButton_script_add_event_handler
* (QToolButton *) toolButton_remove
                                  ==> toolButton_script_remove_even_handler

In "timer" form/dialog:
* (QLineEdit *) lineEdit_command ==> lineEdit_timer_command
* (QTimeEdit *) timeEdit_hours ==> timeEdit_timer_hours
* (QTimeEdit *) timeEdit_minutes ==> timeEdit_timer_minutes
* (QTimeEdit *) timeEdit_seconds ==> timeEdit_timer_seconds
* (QTimeEdit *) timeEdit_msecs ==> timeEdit_timer_msecs

In "trigger pattern" form/dialog:
* (QComboBox) patternType ==> comboBox_patternType
* (QPushButton) fgB ==> pushButton_fgColor
* (QPushButton) bgB ==> pushButton_bgColor
* (QLabel) number ==> label_patternNumber

In "variables" form/dialog:
* (QCheckBox *) hideVariable ==> checkBox_variable_hidden
* (QComboBox *) key_type ==> comboBox_variable_key_type
* (QComboBox *) var_type ==> comboBox_variable_value_type

Note that in the above SOME other elements that are not used in a
programmatic way (e.g. some label identifiers or layout or container
type widgets) have also been renamed in a similar way.

Also:
* The layout of the Timer editor has been "improved" and also now reports
the milli-seconds in "zzz" format rather than "z" so that it is more
obvious that the number is thousandths of a second and can range from "000"
to "999".
* The patterns in the trigger part of the editor are now numbered in a
more human-friendly 1 to 50 instead of the previous 0 to 49.
* When a different trigger is selected the pattern widget is scrolled so
that the highest used pattern number is in view.
* The search process now also searches: the "name" field for all items and
where relevant the "command" fields of "actions", "aliases", "keys",
"timers" and "triggers" {including the "command (up)}" for "buttons" and
the "Css"/"Stylesheet" field for "buttons"/"menus"/"buttons" and the
"Events handled" for "Scripts" and the "pattern" field for "aliases".
* Searching on fields that are multi-line (the Lua scripts for all but
"variables"; the "Css/Stylesheet" for "buttons"/"menus"/"buttons") or
multi-element ("trigger" patterns) indicate the line/column of the start
of the search term or pattern number respectively in the "What" column of
the search results.

A tweak has been included that disables some items on the key and value
QComboBoxs in the "Variable" part of the editor, this uses a means
documented in https://stackoverflow.com/a/21376774/4805858
to replace the "standard" data model for the QComboBox with one from the
QListWidget which allows individual items to be flagged as disabled - which
the standard QComboBox does not.

This is designed to, in conjunction with a refactoring of code in
dlgTriggerEditor::slot_var_selected(...) to prevent invalid choices to be
made by the user (so types that they cannot enter through the Editor widget
but which are included in the type QComboBox s for display purposes:
functions for both and tables for one are disabled).

I would like to hide the editor widget when functions and tables are
selected in the tree widget - but that has proven to mess up the spacing
and layout for the remaining visible widgets and will have to be left until
I can bring: PR 436 "(release 30)bug fix get splitter working properly on
editor right side" into a usable state: #436

I have reordered all QGridLayout constructs in the "touched" dialog/forms in
strict ascending column & row (columns first) order - as Qt Form designer
does not currently enforce this but it increases Git noise in them.

Also have edited tooltip for hidden variable to match new form of hidden
variables control.

Part way through the evolution of this (squashed down to a single)
commit it was decided to revised the search to be an options menu
with space for additional options.

The mechanism now behaves very like the Qt Creator's own search options
which are presented as a clickable menu at the start of the search term
QLineEdit part of the editable QComboBox.

At present only Case Sensitivity is supported but it will be possible to
add additional search options - the most likely being whole word and
regular expression type searches. As the QtCreator inspiration does
different icons are shown depending on the options enabled on the menu
that is displayed is clicked (and encoded into the new enum/QFlags
"SearchOptions" which is stored in dlgTriggerEditor::mSearchOptions). As
new options are coded extra icons that support all the combinations will
be needed (although if a combination is not provided with an icon) the
grey binoculars icon that is used when no option is set is replaced with
a red one to indicate something is enabled and modifying the search
behaviour.

Also currently the options chosen are NOT stored against the search terms
that get stored into the search term QComboBox - it might be wanted to store
the search options chosen as part of each search term (use a item::data for
that) so they can be restore if an existing term is reused...

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
vadi2 pushed a commit that referenced this pull request Jan 12, 2019
* Removed duplicate clear event handlers call

* Revert back to dev version. 3.3 here we go!

* Adds saveWindowLayout() call to AutoSaveOnExit processing.

* Edbee editor implementation (#985)

* Added a frame to edbee so it looks nicer

* Got utf8 module to load (#1074) (update packaging!)

* Modified tooltip for Save and Save Profile to clearly indicate their keyboard shortcuts

* Added: shortcut for delete action in editor (#1084)

* shortcut added for delete action

* Removed redundant edbee config related code (#1091)

* Delete TScriptEditorManager.h

* Delete TScriptEditorManager.cpp

* BugFix: import some fixes by "Zolder" from Mudlet (Realms of Legends) fork

import: some Zoilder fixes from the MudletRL fork:
* in TBuffer::translateToPlainText(...): make some MXP related code execute
  only if Host::mFORCE_MXP_NEGOTIATION_OFF is NOT set as well as another
  condition.
* in TBuffer::wrap(...): change a for(...) {...} loop termination condition
  be a "<" rather than a "<=" test - which sounds like an "off-by-one"
  error fix-up.
* In TTextEdit:updateScreenView(): revise code that seems to prevent the
  width of a "main" console being set too small and NOT written to the
  "parent" Host::mScreenWidth variable - the original modification
  removed such a restriction completely, but I have just lowered the
  minimum from 100 to 40 and ensured it is always stored both in the local
  "main" console and to the parent record in the Host class for that
  console.
* In TTextEdit::drawForeground(...): revise the behaviour *I think* when
  at the point where a console "split" becomes unnecessary...

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Cut down on the length of some variable names (#1086)

* Clarified use of QLatin1String

* Adding GCC 5 for C++14 requirement (#1098)

* Fixed "reset map colors" button to work (#1049)

* Fixed "reset map colors" button to work

That's a 5 year old bug out of the way!

* Change travis configuration to use installed gcc-5 (#1108)

* Change travis configuration to use installed gcc-5

* Fixes #1104 (#1109)

Thanks to Rick for his prompt response on this

* Fixed typo in GeyserLabel.lua

Per #1112

* Fix locale to C

Enforce uniform locale so scripts don't get tripped up on number representation differences (. vs ,)

* IRC client update of UI and logic (#1072)

* Add Communi Model & Util libs

* Full refactor of IRC Client code & UI

This retains the primary functions of the old IRC client but adds many
more new IRC commands by default. The UI is slightly more organized and
interactive now.

* Adds QPointer to IRC Dialog pointer variable.

* Update Lua `sendIrc()` slightly.

* Added /msg command, Input History, and updated display colors.

Input History stores a total of 8 previously entered commands the user
can cycle through using the Up Arrow key.
The previously include /msg command has been added again.
Colors of some messages have been updated for (relatively) easier
distinction of message lines.

* Updated channel handling.

* Fix CMake builds

Things needed to fix CMake builds:
- communi CMake builds needed `include_directories` explicitly specified
- more MOC calls in communi
- more explicit dependencies to MOC files in communi
- ircmessageformatter must be compiled into mudlet

* IRC3 with more Lua features (#1087)

Changes IRC client to run with settings given per-profile, making the IRC client more visible and configurable within Lua.   
This adds configuration options to the settings window in the "Special Options" tab for configuring an IRC client on the host profile which opens the settings window.   
See the PR summary comment for details on available Lua functions and IRC Client commands.

* Add a Code of Conduct (#1110)

* Create CODE_OF_CONDUCT.md

* Fix for the QMake warnings caused by the IRC library includes.

* Finished formatting all filed & added braces (#1115)

* Finished formatting all filed & added braces

* Re-enabled map load on profile load (#1118)

* Re-enabled map load on profile load - disabling it broke scripts that relied on map data w/o the map open

* updated assignments.

* Event-based gamepad functionality (#1106)

* Add theme switching to code editor (#1095)

* Fix more Toolbar & Button bugs (#1080) (#1090)

* Fix bugs with Buttons & Toolbars.

- Fixed change detection for location, orienation, and CSS data.
- Buttons are not rendered unless they are part of a group,
Toolbar/Menu.
- ToolBars whos locations are changed now hide their previous TToolBar
or TEasyButtonBar instance as needed.

* Fix Buttons being left behind when parent toolbar is deleted.
Also allows TAction to use QPointer<T>

* Update old sourceforge page links (#1132) (#1134)

* Fixed blank command separator to not separate as people expect

* Replaced isTempKey, isTempAlias, etc with isTemporary (#1102)

* also pushed isFolder() and setIsFolder() to the parent Tree class

* Give meaning to encodings (#1107)

* Delete dev_README

Deleted outdated dev_README file.

It also didn't seem to be used all that often, else people would have raised the fact that it's outdated...

* Update travis to use Qt 5.9 for compiling (#1141)

* Re-add single QT 5.6 build job

Since we want to keep sure that the minimal Qt version is still compilable (currently we need at least 5.6), we add a single job for that version.

* Refactor: rename QMake project/sub-project files (#1103)

* refactor: rename QMake project/sub-project files

It is down right confusing having several project files in the Qt IDE
which are all labelled "src" - this commit renames the main project file
from "src.pro" to "mudlet.pro" and also renames:
* the lua_yajl module from src.pri to lua_yajl.pri
* the luazip module from src.pri to luazip.pri
it also:
* adds a new communi.pri file (see below)

I also took the liberty of renaming the project resource file from:
* mudlet_alpha.qrc to mudlet.qrc (we are well past the alpha stage now!)
and sorting a couple of items into the right order.

By creating a local project file 3rdparty/communi/communi.pri it is
possible to group the three separate but related communi libraries into
one - as it happens the effective content of the new file is identical to
that of the communi libraries own libcommuni/src/src.pri but it has some
notes on how the portion of the upstream library that we are using was
picked out of there; how to identify the effect version and how to
(hopefully) recreate things if upstream gets revised in the future!

By not using the upstream "src.pri"/"src.pro" files we avoid the confusion
of having a generic "src" project in the Mudlet project as a whole and it
is clearly identify-able as a file from the Mudlet project rather than the
sub-project that it pulls into the whole thing...

There is an minor nuisance side-effect in that having the main project
src.pro file open in a Qt Creator IDE or stored in a session will get
confused when this commit takes effect as the file will disappear from
the repository - it will be necessary to close the project and open the
new src/mudlet.pro project file (and possibly re-enter the build steps)
- OTOH the main project will now be identified as "mudlet" in Creator
rather than the previous "src". 😄

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Removed accidental debug echo left in (#1151)

* initialize int nIrcPort with dlgIRC::DefaultHostPort value. (#1153)

* Removes false from sendIrc() return, ignores command filtering status (#1154)

* Removes false from sendIrc() return, ignores command filtering status (not used).

* Remove punctuation from lua messages

* Improved layout of IRC preferences (#1152)

* Fix get map events (#1120)

* Adapt addMapEvent error messages to current standard
* Fix getMapEvents()
The function now returns a proper indexed table of objects that each describe
a map event.

* Add missing call to set Editor as editable. (#1159)

* Fixed tab indent to be two spaces again

* Fixed getComputerEncoding in case no key found

It'll now return the original value passed - it's way better than returning the wrong value.

* Add linux ci deployment (#1128)

* Modify files needed for CI deployment of linux builds

* Syntax fix in .travis.yml

* tar the CI AppImages as well

* Add lua sqlite runtime dependency

* Unset LD variable for linuxdeployqt

* Bugfix: unset LD_LIBRARY_PATH in every codepath

* Test: install appmenu-qt5 for global menus

* Revert 781ef97 (Install appmenu-qt5)

The issue was that the first AppImage used Qt 5.6.2 instead of Qt 5.9 (which is how 3.2 was built and how it is build now after merging development in)

* Remove manager again (#1163)

* Improved map load output to be condensed down if it's all successful (#1117)

OK! Would be happy to see that in as well for maps that take a while to load (>1s).

* Re-enable search highlighting (#1096)

* Remove mainwindow statusbar (#1162)

* Replaced statustips with tooltips in the mapper menu

* Removed statusbar

* Tagging 3.3.0

* Initial QTextToSpeech additions

* Further TTS additions and bugfixes

* Wrapping TTS functions in #ifdefs for QT_TTS_LIB

* Missing #ifdefs

* More misplaced #ifdef lines for TTS functions

* More QT_TTS_LIB ifs

* Adding QTextToSpeech to cmake lists

* Various TTS updates

* Adding GetState to TLuaInterpreter.h

* Minor fixes

* Tts temporary fixes

* Exchanging toLatin1 with toUtf8

* Fix cmake TTS module includesion

* Install Qt 5.9 TTS module on linux

* Use Qt provided definition for enabled modules

We don't need (and possibly don't want) to provide our own definition for when a module is enabled. Let's use the Qt provided definition instead.

* Output confirmation messages of enabled Qt modules

* Use upper case "Gamepad" in output

* ttsClearQueue crash fix

* Fix for global speech events

* Whitespace replacement

* Various minor fixes

* More minor fixes.

* Cleanup: make CMakeList.txt have uniform indenting and adjust CMake message

The minimum versions of the Qt TextToSpeech and Gamepad reported in the
CMake project files needed tweaking.

I have also tried to regularise the indentation in the Mudlet CMake project
files to standardise on 2 spaces.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Reformat: clean up code-loyout of new TTS TLuaInterpreter code

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* BugFix: fixup a switch() in (int) TLuaInterpreter::ttsGetState(lua_State*)

This switch was missing "break;" on all the cases and must have been
defective without them - for all but the last case extra strings would have
been pushed onto the lua stack but as the return value was 1 they may have
been discarded...

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Enable Qt 5.9 Windows builds for testing

* Deploy Qt 5.9 builds for testing

* Fixing double-events for queueing purposes

* Added missing symbol

* Added missing symbol

* Updating tts events to globals and adding voice

* Create TTSValues.lua

* Adding TTSValues to LuaGlobal

* Adding TTSValues to Mudlet project

* Update CMakeLists.txt

* Update TTSValues.lua

* Update Qt to 5.10 for trusty

This is needed to hopefully have some TTS backend plugins in Linux

* Queueing and crash fixes

* Renaming tts funcs

* Renaming internal functions

* Adding functions for retrieving settings

* Fixing typo

* Making ttsGetState public

* Improve error messages for ttsGetCurrentLine()

It can be incredibly frustrating to just get a boolean back as an error message when you don't know what is going on

* Update error message to be consistent with the new style

* Aligned error messages to be consistent with the new style

* Fix ttsClearQueue to return nil+error, not actually error on invalid index

* Minor code formatting

* Floats to doubles

* Update documentation links
SlySven added a commit to SlySven/Mudlet that referenced this pull request Jun 22, 2020
Following on from Mudlet#1096 I realised
that the search capability was still not case sensitive and given that Lua
is a case preserving language this struck me as a nuisance.  It is now
possible to configure this feature when searching with a button that
displays "Aa" when searches are not case sensitive (i.e. a search for "A"
will also find "a") and "AA" when the case does matter (i.e. a search for
"A" will not find the lower case one).

As we now have "boarder-outlines" around all the instances found in an
element in a lua script component, we ought to have a means to removed them
afterwards without having to click on another item and then return to the
current one being considered.  This commit attempts to add a clear button
to both clear the treeWidget_searchResults but also to remove those border
outlines.  I am  not sure that this aspect is complete...

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants