0xtechnobabble
ecf58ddd4f
TextEditor: Implement replacement functionality
...
This patch adds a new replace widget that cooperates with the find
widget, the replace widget takes the input in the find textbox, searches
for occurences of that input, and replaces them with the input provied
in the replace textbox.
2020-01-12 01:41:36 +01:00
Andreas Kling
6425b8714a
TextEditor: Handle drop events
...
We now handle drop events with data type "url-list". This makes it
possible to drop a file from FileManager on TextEditor to open it.
2019-12-20 20:07:10 +01:00
Sasan Hezarkhani
8cea5c053d
TextEditor: `Fix bug when document is marked dirty on open.
...
Currently, when `set_text()` is called on GTextDocument a change is
triggered and all clients registered get a document_did_set_text
call. This in turn causes the TextEditorWidget to mark the document
as dirty even on the first open, which makes for a weird experience.
2019-12-06 19:45:13 +01:00
Andreas Kling
f8703d44cc
TextEditor: Focus the editor widget on startup
2019-11-30 15:35:19 +01:00
Andreas Kling
d6abfbdc5a
LibCore: Remove ObjectPtr in favor of RefPtr
...
Now that CObject is fully ref-counted, just use RefPtr everywhere! :^)
2019-09-22 00:31:54 +02:00
Andreas Kling
defafd72bc
LibGUI: Convert custom widgets and subclasses to ObjectPtr
2019-09-21 20:04:00 +02:00
Andreas Kling
ff6ce422dd
LibGUI: Convert GWidget to ObjectPtr
2019-09-21 17:05:35 +02:00
Andreas Kling
3476a63415
LibGUI: Convert GStatusBar to ObjectPtr
2019-09-21 16:29:47 +02:00
Andreas Kling
93851c3832
LibGUI: Convert GTextBox, GTextEditor and GResizeCorner to ObjectPtr
2019-09-21 15:46:47 +02:00
Andreas Kling
b1763238d7
TextEditor: Ask the user before closing a dirty (modified) document
...
It's a little unfortunate that we have two separate code paths that can
lead to asking the user about this. Longer-term we should find a way to
unify these things.
Fixes #491 .
2019-08-27 20:39:01 +02:00
Andreas Kling
ecbedda34c
TextEditor: Add a "document dirty" flag and show it in the window title
...
This lets you know if the document has been modified since last save.
2019-08-27 20:18:19 +02:00
Andreas Kling
ded005500d
TextEditor: Add actions for find next/previous (Ctrl+G, Ctrl+Shift+G)
2019-08-25 21:46:39 +02:00
Andreas Kling
97a695403b
TextEditor: Add a menu action for turning line-wrapping on/off
2019-08-25 12:23:34 +02:00
Andrew Weller
e75e33eb46
TextEditor: Replaced 'Find' button with 'Prev' and 'Next' buttons.
2019-08-24 21:57:42 +02:00
Andreas Kling
fae379b1f0
TextEditor: Search box should find on return, close itself on escape
...
This patch adds basic keyboard access to the search box. We also yield
focus back gracefully to the text document when the search box is no
longer wanted.
Focus should probably move automatically when an ancestor of the
currently focused widget if made invisible..
2019-08-22 11:11:48 +02:00
Andreas Kling
96c5c9ce12
TextEditor: Hide the search bar until the user asks for it
...
You can get to it via Edit/Find, or by pressing Ctrl+F.
2019-08-22 11:02:03 +02:00
Andreas Kling
bb74832dd6
TextEditor: Add a search bar that allows you to search for text
...
If the text is not found, we show a friendly message box that says we
didn't find the text! :^)
2019-08-21 21:30:20 +02:00
rhin123
a175e76948
TextEditor: Include extension during SaveAs
...
When we save-as in the text editor we now auto-populate GFilePicker /w
the current name & extension.
2019-07-29 20:46:31 +02:00
Rhin
d6cd98cfa1
TextEditor: Fix nullptr refrence to save action & m_path ( #364 )
...
We forgot to persist our actions in the constructor for later reference, whoops.
Also use the correct path in the "open" action.
2019-07-26 06:48:39 +02:00
Andreas Kling
442256b5f8
TextEditor: Add "Save as..." action.
...
Add a basic "save as" action to the TextEditor app, and make "save" fall
back to using "save as" if there's no name already set.
Fixes #282 .
2019-07-24 06:32:30 +02:00
rhin123
82d9410226
TextEditorWidget: Added improved save feature.
...
Instead of saving to a temp file, the TextEditorWidget now saves
to a path returned by the improved GFilePicker.
2019-07-15 18:33:33 +02:00
Rhin
d7b836858e
TextEditor: Move the application UI into a dedicated TextEditorWidget. ( #292 )
...
Added a main widget for the text editor as a stepping stone to add new features.
2019-07-11 20:52:33 +02:00