Andreas Kling
e83390387c
LibGUI: Simplify GCommonActions a bit
...
Use the same callback signature as GAction so we can just forward it
to GAction instead of chaining callbacks.
2019-09-14 22:10:44 +02:00
Andreas Kling
9d2c4d223a
TextEditor+Base: Add an icon for the "Find" action :^)
2019-09-13 23:56:37 +02:00
Andrew Weller
16aba5100d
TextEditor: Implement File/New Action
...
The user is asked if they want to save a dirty file before they create
a new one.
2019-09-06 18:38:26 +02:00
rhin123
f468634494
TextEditorWidget: Added GCommonActions
2019-09-05 09:40:54 +02:00
Andreas Kling
841f1276e6
TextEditor: Use GAboutDialog :^)
2019-09-02 19:48:47 +02:00
Andreas Kling
cfe09784a4
TextEditor: Clear the dirty flag in newly opened documents
2019-08-29 18:54:06 +02:00
Andreas Kling
72950f93a3
TextEditor: Move the Font menu inside the View menu
...
This will be our first user of the nested menus feature. :^)
2019-08-29 06:36:35 +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
07933d0b46
TextEditor: Let's enable line wrapping by default
2019-08-27 17:05:01 +02:00
Andreas Kling
b6de723eb3
TextEditor: Move line wrapping setting to a new "View" menu
2019-08-27 17:01:52 +02:00
Andreas Kling
cef2c04952
TextEditor: Move all "File" menu entries into the app menu instead
...
It felt weird to have both the app menu *and* a "File" menu.
2019-08-26 17:59:05 +02:00
Andreas Kling
d5f3487203
TextEditor: Select everything in the find textbox when pressing Ctrl+F
...
This allows you to press Ctrl+F and immediately start typing a new
search string, instead of having to remove the old one first. :^)
2019-08-25 21:46:39 +02:00
Andreas Kling
e8e8741c88
LibGUI+TextEditor: Make GButton activate its action if present
...
Previously even if you assigned a GAction to a GButton, you still had
to activate() the action manually by hooking the GButton::on_click
callback.
2019-08-25 21:46:39 +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
d88c40568f
TextEditor: Add search-related actions to the text editor context menu
...
Using the new GTextEditor::add_custom_context_menu_action() mechanism.
Fixes #478 .
2019-08-25 21:46:28 +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
b1bc7a1b5d
TextEditor: Don't try to load contents of files we didn't even open
...
If the CFile::open() call fails, we shouldn't continue with trying to
load the file.
2019-08-23 19:11:56 +02:00
Andreas Kling
d56786ccd8
TextEditor: Avoid an unnecessary whole-file copy when opening something
...
This was left over from before we had the StringView(const ByteBuffer&)
constructor to help us.
2019-08-23 19:05:34 +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
Andreas Kling
841b2e5d13
WindowServer+LibGUI: Pass window icons as shared buffers rather than paths.
...
Now that we support more than 2 clients per shared buffer, we can use them
for window icons. I didn't do that previously since it would have made the
Taskbar process unable to access the icons.
This opens up some nice possibilities for programmatically generated icons.
2019-07-28 10:18:49 +02:00
Andreas Kling
b98c77229d
TextEditor: Let's have line numbers starting at 1.
...
Thanks to Dan for pointing this out on IRC:
<danboid> I see TextEditor still numbers its lines from 0. You're too much of a programmer sometimes kling! :)
< kling> that might be the most extreme form of "programmer design" I've seen in serenity
2019-07-27 21:20:38 +02:00
Andreas Kling
eda272eec8
TextEditor: Add back lost "Save as..." action.
2019-07-27 20:32:19 +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
Andreas Kling
72a3f69df7
LibGUI: Get rid of GWindow::should_exit_event_loop_on_close().
...
This behavior and API was extremely counter-intuitive since our default
behavior was for applications to never exit after you close all of their
windows.
Now that we exit the event loop by default when the very last GWindow is
deleted, we don't have to worry about this.
2019-07-23 18:20:00 +02:00
rhin123
9724d540b6
TextEditor: Show window icon
2019-07-17 21:14:14 +02:00
Andreas Kling
a17fbd98e7
LibGUI: Add input types to GMessageBox.
...
Currently the two available input types are:
- GMessageBox::InputType::OK (default)
- GMessageBox::InputType::OKCancel
Based on your choice, GMessageBox::exec() will return ExecOK or ExecCancel.
2019-07-16 21:41:13 +02:00
rhin123
1f77fbb75c
TextEditorWidget: Stop dbgprintf from printing null
2019-07-16 08:34:51 +02:00
rhin123
1bcf3968f2
TextEditor: Show window after text_widget loads
2019-07-16 08:34:51 +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
Andreas Kling
d0a2668833
TextEditor: Fix build (copy_ref() in outdated PR changes.)
2019-07-11 21:30:49 +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
Andreas Kling
323704c851
TextEditor: Remove use of copy_ref().
2019-07-11 16:04:53 +02:00
VAN BOSSUYT Nicolas
802d4dcb6b
Meta: Removed all gitignore in the source tree only keeping the root one
2019-06-30 10:41:26 +02:00
Lawrence Manning
f0a6b42066
Move common Application build steps into their own Makefile.common
...
Further consolidation is of course possible, eg the Games/ programs
follow the same rules more or less.
2019-06-25 21:35:50 +02:00
Andreas Kling
fd604a7c68
Applications: Run clang-format on everything.
2019-06-07 11:48:03 +02:00
Robin Burchell
1024dfa81a
StringViewize a bunch of things -- mostly LibGUI
2019-06-03 20:27:05 +02:00
Andreas Kling
4040c6137d
TextEditor: Fix window title when starting with an empty document.
2019-05-27 23:33:47 +02:00
Andreas Kling
b311257098
Applications: Let's put spaces in app names
...
"FileManager" => "File Manager"
"FontEditor" => "Font Editor"
"ProcessManager" => "Process Manager"
"TextEditor" => "Text Editor"
2019-05-27 13:52:28 +02:00
faissaloo
6ac8aab941
GFilePicker: Return paths as FileSystemPath rather than String
2019-05-26 22:52:09 +02:00
Robin Burchell
cef161c2bc
TextEditor: Make use of GFilePicker to select a file to open
2019-05-16 13:31:19 +02:00
Andreas Kling
852d648912
Fix "make clean" not deleting app binaries.
2019-05-13 14:56:18 +02:00
Andreas Kling
ab42180e83
Fix some more victims of the new default layout spacing.
2019-05-11 03:06:18 +02:00
Andreas Kling
71770e000b
GTextEditor: Add very basic automatic indentation.
...
This is off by default, but enabled by TextEditor. It simply inserts the
same number of leading spaces as the previous line when hitting Enter. :^)
2019-04-25 22:56:09 +02:00
Andreas Kling
4bea3a4aa6
GTextEditor: Turn off the ruler by default.
...
You're usually not gonna want the ruler. TextEditor can enable it manually.
2019-04-24 23:06:44 +02:00