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
Andreas Kling
57da00b731
Include Makefile.common in all other Makefiles.
2019-04-21 04:09:39 +02:00
Andreas Kling
ab94a6be00
AK: Add String::copy(BufferType) helper.
...
This will create a String from any BufferType that has data() and size().
2019-04-20 14:13:40 +02:00
Andreas Kling
301a269ca0
Get rid of SERENITY macro since the compiler already defines __serenity__
...
This makes it a bit easier to use AK templates out-of-tree.
2019-04-20 12:58:49 +02:00
Andreas Kling
ae3ec3fc37
LibGUI: Give GTextEditor a context menu.
...
Now GTextEditor manages its own editing actions (cut/copy/paste/etc) and
will show a context menu containing them when requested.
Apps that want to put a GTextEditor's actions in its menu can get to the
actions via public getters. :^)
2019-04-18 12:28:29 +02:00
Andreas Kling
c09c114d77
WindowServer+LibGUI: Add ability to set per-window icons.
...
The icons are passed around as filesystem paths for now, since the shared
memory bitmaps only support 2 sides.
2019-04-13 16:59:55 +02:00
Andreas Kling
054c982181
LibGUI+WindowServer: Add support for enabled/disabled actions.
...
The enabled state of a GAction now propagates both to any toolbar buttons
and any menu items linked to the action. Toolbar buttons are painted in
a grayed out style when disabled. Menu items are gray when disabled. :^)
2019-04-12 02:53:27 +02:00
Andreas Kling
cfd6e6cc36
LibCore: Move GIODevice hierarchy from LibGUI to LibCore.
2019-04-10 20:22:23 +02:00
Andreas Kling
5e0577a042
Introduce LibCore and move GElapsedTimer => CElapsedTimer.
...
I need a layer somewhere between AK (usable both by userspace and kernel)
and LibGUI (usable by userspace except WindowServer.) So here's LibCore.
2019-04-10 16:14:44 +02:00
Andreas Kling
313ac51832
LibGUI: Turn GTextBox into a wrapper around a single-line GTextEditor.
2019-04-10 03:08:29 +02:00
Andreas Kling
670e376e27
Tweak the look of various UI surfaces and buttons.
2019-03-27 20:48:23 +01:00
Andreas Kling
23bb276fcd
LibC: Run constructors on process startup.
...
Cooperate with the compiler to generate and execute the _init_array list
of constructor functions on userspace program statup. This took two days
to get working, my goodness. :^)
2019-03-27 12:48:21 +01:00
Andreas Kling
7c0a185970
Use the PNG loader for all images, and get rid of the .rgb files.
2019-03-22 00:21:03 +01:00
Andreas Kling
ed2303e2d8
TextEditor: The delete key should work even when there's no selection.
2019-03-20 23:11:00 +01:00
Andreas Kling
f0915641c5
TextEditor: Add "delete" action.
2019-03-20 18:16:04 +01:00
Andreas Kling
57ff293a51
LibGUI: Implement nested event loops to support dialog boxes.
...
This patch adds a simple GMessageBox that can run in a nested event loop.
Here's how you use it:
GMessageBox box("Message text here", "Message window title");
int result = box.exec();
The next step is to make the WindowServer respect the modality flag of
these windows and prevent interaction with other windows in the same
process until the modal window has been closed.
2019-03-19 00:01:02 +01:00
Andreas Kling
9ad076178a
GIODevice: Add a read_all() that returns a ByteBuffer with all we can read.
...
Use this to implement file opening in TextEditor.
2019-03-18 14:38:30 +01:00
Andreas Kling
5b0cbf547d
Base: Some work on various icons.
2019-03-17 00:33:49 +01:00
Andreas Kling
78039ef057
TextEditor: Add actions for undo and redo. Not hooked up yet.
2019-03-16 23:16:11 +01:00
Andreas Kling
3a3aa74b2e
IRCClient: Add a toolbar with some actions.
2019-03-15 23:24:40 +01:00
Andreas Kling
5d69bf06d2
LibGUI: Don't fill widgets with background color by defualt.
2019-03-10 13:16:36 +01:00
Andreas Kling
702adb13c1
TextEditor: Remove the selection from the status bar.
2019-03-09 22:04:54 +01:00
Andreas Kling
032549d7bf
GTextEditor: Refactor selection into a GTextRange class.
...
This is a bit more expressive than "selection start + current cursor".
2019-03-08 18:28:24 +01:00
Andreas Kling
48d48679b0
GTextEditor: Work on cut/copy/paste operations.
2019-03-08 14:08:15 +01:00