Commit Graph

118 Commits

Author SHA1 Message Date
Andreas Kling
d86fb8033e FileManager: Show info about currently selected items in statusbar
When there's a non-zero number of selected items, we now show the
number in the statusbar, along with the total selected file size. :^)

Fixes #271.
2019-09-12 18:59:13 +02:00
Andreas Kling
1632f6b2dd FileManager: Add C_OBJECT macro to DirectoryView 2019-09-12 18:26:26 +02:00
Aaron Malpas
026a8be4e5 File Manager: Implement copy-paste
The files to copy are remembered with the clipboard, which stores a 
command (e.g. "copy") and files to be copied on different lines.
2019-09-10 19:28:41 +02:00
Aaron Malpas
7841aadb41 FileManager: Create FileUtils
This could later be replaced with library-provided utility functions
when/if they exist.
2019-09-10 19:28:41 +02:00
Aaron Malpas
b894803a30 FileManager: Add on_selection event for DirectoryView
There needs to be a way to know when a user has selected a file. 
file_system_model->on_selection_changed only fires on directory 
change.
2019-09-10 19:28:41 +02:00
Andreas Kling
fb275c9442 FileManager: Make the tree view follow the path changes correctly
The left-side tree view was not following along when switching paths
via the right-side views. Hook this back up.
2019-09-08 09:08:50 +02:00
Andreas Kling
6dec328af7 LibGUI+FileManager: Add GAbstractView::on_selection_change hook
This hook will be called whenever the view's selection changes somehow.
Use this in the FileManager to keep the left and right views in sync.
2019-09-07 21:35:04 +02:00
Andreas Kling
9d97781e37 FileManager: Port to using GModelSelection 2019-09-07 20:41:14 +02:00
rhin123
86c68210f0 FileManager: Added GCommonActions 2019-09-05 09:40:54 +02:00
Andreas Kling
5cfd67ecbb FileManager: Open ".wav" files in SoundPlayer when activated
Now you can double-click on WAV files in the FileManager. Neato! :^)
2019-09-04 20:20:36 +02:00
Andreas Kling
b0b94560c3 FileManager: Add "go home" action to the "Go" menu 2019-08-26 21:20:39 +02:00
Andreas Kling
08d7c86e90 FileManager: Move "File" menu entries to the app menu 2019-08-26 19:18:54 +02:00
Andreas Kling
076827a05d GModel: Rename on_model_update(GModel&) => on_update()
Just simplifying the API of this hook a little bit.
2019-08-20 19:45:08 +02:00
Andreas Kling
f7dce05c82 LibGUI: Remove confusing GModelNotification concept
This was a bad idea and it didn't stick. Instead we should just use the
simple "on_foo" hook functions like we do for everything else. :^)
2019-08-20 19:44:02 +02:00
Conrad Pankoff
fed0133109 FileManager: Show home directory by default, or command line argument
FileManager used to open up with the root directory loaded by default.
Now it will try to load either 1) the first argument specified on the
command line, 2) the user's home directory, or 3) the root directory.

Fixes #389
2019-07-31 16:33:21 +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
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
Andreas Kling
5f0f1ce9d2 FileManager: Add a toolbar button for going to the home directory.
Fixes #308.
2019-07-21 09:19:09 +02:00
Andreas Kling
aa2224a2f0 GWidget: Add set_preferred_size(width, height) overload.
It was annoying to always write set_preferred_size({ width, height }). :^)
2019-07-20 22:39:24 +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
Andreas Kling
954a0b8efe AK: Add a canonicalized_path() convenience function.
This is the same as calling FileSystemPath(foo).string(). The majority of
clients only care about canonicalizing a path, so let's have an easy way
to express that.
2019-07-15 06:50:32 +02:00
Andreas Kling
c0742e4c23 FileManager: Remove use of copy_ref(). 2019-07-11 15:59:06 +02:00
Andreas Kling
7083a0104a LibGUI: Add GActionGroup, a way to group a bunch of GActions.
This can be used to make a bunch of actions mutually exclusive.
This patch only implements the exclusivity behavior for buttons.
2019-07-09 22:10:03 +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
90b1354688 AK: Rename RetainPtr => RefPtr and Retained => NonnullRefPtr. 2019-06-21 18:37:47 +02:00
Andreas Kling
39d1a9ae66 Meta: Tweak .clang-format to not wrap braces after enums. 2019-06-07 17:13:23 +02:00
Andreas Kling
fd604a7c68 Applications: Run clang-format on everything. 2019-06-07 11:48:03 +02:00
Robin Burchell
7bce096afd Take StringView in more places
We should work towards a pattern where we take StringView as function
arguments, and store String as member, to push the String construction
to the last possible moment.
2019-06-02 12:55:51 +02:00
Robin Burchell
0dc9af5f7e Add clang-format file
Also run it across the whole tree to get everything using the One True Style.
We don't yet run this in an automated fashion as it's a little slow, but
there is a snippet to do so in makeall.sh.
2019-05-28 17:31:20 +02:00
Christopher Dumas
50154a23cb most apps now begin in the correct directory 2019-05-27 21:40:53 +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
Christopher Dumas
00075b1c8a Added functionality to make back and forward buttons work in FileManager. Also
fixed it so that directories don't get double-opened (first when they are
opened, and second when the selection changes to match in the file tree view)
2019-05-24 00:24:28 +02:00
Andreas Kling
852d648912 Fix "make clean" not deleting app binaries. 2019-05-13 14:56:18 +02:00
Andreas Kling
1ab66e4d33 FileManager: Tweak layout spacing (new default looks weird here.)
This app needs a layout rethink, but for now I'm just fixing breakage.
2019-05-11 02:35:03 +02:00
Andreas Kling
fa232ac180 LibGUI: Remove GModel activations to GAbstractView.
Now you can hook activation via GAbstractView::on_activation.
The design still isn't quite right, we should eventually move the selection
away from the model somehow.
2019-05-09 04:56:52 +02:00
Andreas Kling
bd5c79aff2 LibGUI: Start working on a file picker dialog (GFilePicker).
Have LibGUI adopt GDirectoryModel from FileManager since it fits perfectly
for the needs of a file picker.
2019-05-09 01:24:37 +02:00
Andreas Kling
d4ac9e9a8a FileManager: When mkdir() fails, show the path we passed in the message. 2019-05-08 22:41:19 +02:00
Andreas Kling
de98b2770b GMessageBox: Add icons to message boxes with 3 standard ones to choose from. 2019-05-08 20:13:39 +02:00
Andreas Kling
8f81a3f9dd LibGUI+WindowServer: Make it possible to have checkable GActions.
They show up as checkable GButtons in GToolBar, and with (or without) check
marks in menus.

There are a bunch of places to make use of this. This patch only takes
advantage of it in the FileManager for the view type actions.
2019-04-26 21:09:56 +02:00
Andreas Kling
38e1e205a5 FileManager: Add a window icon. 2019-04-23 20:42:47 +02:00
Andreas Kling
57da00b731 Include Makefile.common in all other Makefiles. 2019-04-21 04:09:39 +02:00
Andreas Kling
5eedb22834 Sprinkle use of AK::Vector in various places.
Some of these are less helpful than others. Avoiding a bunch of mallocs
in the event loop wakeup code is definitely nice.
2019-04-20 14:02:19 +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
d8e1545783 LibCore: Move LibGUI/GLock to LibCore/CLock. 2019-04-10 22:39:59 +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
4ab0cd5d4c LibGUI: Move frame painting from GFrame to StylePainter.
This way it can be used by others who might not have a GFrame object.
2019-04-10 03:43:46 +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
f8a1d2746e FileManager: Rename DirectoryTableView => DirectoryView. 2019-04-02 14:43:56 +02:00
Andreas Kling
9538c06a45 LibGUI: Add a simple GSplitter container widget.
This allows you to put multiple widgets in a container and makes the space
in between them draggable to resize the two adjacent widgets.
2019-03-30 13:53:30 +01:00