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
31b38ed88f
LibGUI: Don't create GMessageBox and GInputBox on the stack
...
We need to get rid of all instances of widgets-on-the-stack since that
will no longer work in the ref-counting world.
2019-09-21 20:32:31 +02:00
Andreas Kling
defafd72bc
LibGUI: Convert custom widgets and subclasses to ObjectPtr
2019-09-21 20:04:00 +02:00
Andreas Kling
7584480f62
LibGUI: Convert GWindow to ObjectPtr
2019-09-21 18:34:06 +02:00
Andreas Kling
ff6ce422dd
LibGUI: Convert GWidget to ObjectPtr
2019-09-21 17:05:35 +02:00
Andreas Kling
ceb5508fea
LibGUI: Convert GProgressBar to ObjectPtr
2019-09-21 16:31:12 +02:00
Andreas Kling
3476a63415
LibGUI: Convert GStatusBar to ObjectPtr
2019-09-21 16:29:47 +02:00
Andreas Kling
f4531c976c
LibGUI: Convert GToolBar to ObjectPtr
2019-09-21 16:27:54 +02:00
Andreas Kling
4f4438c04c
LibGUI: Convert GSplitter to ObjectPtr
2019-09-21 16:11:02 +02:00
Andreas Kling
efb8f9d538
LibGUI: Convert GTreeView to ObjectPtr
2019-09-21 16:06:43 +02:00
Andreas Kling
e7b55037f4
LibGUI: Convert GTableView to ObjectPtr
2019-09-21 16:03:59 +02:00
Andreas Kling
c13b9e2214
LibGUI: Convert GItemView to ObjectPtr
2019-09-21 15:47:58 +02:00
Andreas Kling
93851c3832
LibGUI: Convert GTextBox, GTextEditor and GResizeCorner to ObjectPtr
2019-09-21 15:46:47 +02:00
Andreas Kling
c7437f9caa
LibGUI: Convert GLabel to ObjectPtr
2019-09-21 15:25:08 +02:00
Andreas Kling
482d5295f1
FileManager: Allow deleting without confirmation via Shift+Delete
...
A powerful command for powerful users. :^)
2019-09-18 21:53:47 +02:00
Andreas Kling
33b8c807a6
FileManager: Implement basic file deletion
...
The delete action now actually deletes files (after asking the user for
confirmation, of course.) Deleting directories is not yet supported.
Fixes #541 .
2019-09-18 21:46:14 +02:00
Brandon Scott
a4d52b122d
FileManager+LibGUI: Fix two folder-related crashes ( #569 )
...
Fix a crash when opening a folder, and another one when trying to open
a newly created folder.
It was not safe to modify a GModelSelection while it's being iterated over.
Fixes #536 .
2019-09-17 09:26:10 +02:00
Andreas Kling
4463adc0ff
FileManager: Show human-readable file size info in the status bar
...
Fixes #553 .
2019-09-15 17:50:15 +02:00
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
31046b18bb
FileManager: Use a special clipboard data type for copied file lists
...
When copying a list of files to the clipboard, we now use the special
data type "file-list".
This allows us to have the paste action's enabled state reflect the
actual ability to paste something. :^)
2019-09-14 09:20:20 +02:00
Andreas Kling
ff72b4d475
FileManager+Base: Add "properties" icon
...
Something to show for the properties action in FileManager. It still
doesn't actually do anything, but at least now it looks neat. :^)
2019-09-13 23:07:59 +02:00
Andreas Kling
5eb2c138e2
FileManager: Update enabled state of the copy and delete actions
...
Based on whether something is selected or not. I added a FIXME about
the paste action, since that will require some more coordination with
the system clipboard.
2019-09-13 22:09:01 +02:00
Andreas Kling
27e1128e6e
FileManager: Assign keyboard shortcuts to the various actions
2019-09-13 22:04:08 +02:00
Andreas Kling
3a02bd40f8
FileManager: Add a basic context menu with copy/paste/delete/...
...
I also added a dummy "Properties..." action just to fill out the menu a
little bit. :^)
Fixes #270 .
2019-09-13 22:00:47 +02:00
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