Commit graph

1210 commits

Author SHA1 Message Date
Linus Groh
8b195d1211 TextEditor: Fix typo in comment 2020-04-28 23:12:16 +02:00
Andreas Kling
5eaa7ff406 TextEditor: Add live preview when editing markdown :^)
This works by hooking into the change notifications from the TextEditor
widget and parsing the document content as markdown, and generating an
HTML document from it which is displayed using LibWeb.

This will make it a bit easier to write man pages! :^)
2020-04-28 21:46:43 +02:00
Andreas Kling
ea204ef05b LibMarkdown: Drop MD prefixes and move into "Markdown" namespace :^) 2020-04-28 21:04:25 +02:00
Andreas Kling
3cc31ff3f3 Browser: Make Ctrl+L select the location bar again
..by making sure the Tab actions are scoped to the Tab.
2020-04-28 20:36:08 +02:00
Andreas Kling
5b4b72e699 Browser: Don't put favicons as the window icon
It's nicer to always use the browser's own app icon instead. :^)
2020-04-28 20:31:51 +02:00
Hüseyin ASLITÜRK
b3bdab8cf7 Application: Fix for reboot on PowerDialog close button click 2020-04-28 20:30:48 +02:00
Andres Vieira
bcd5e97286 DisplayProperties: Allow going from a wallpaper to a background colour
Before this patch DisplayProperties couldn't handle correctly going from
a set wallpaper to a background color.

This patch adds a new "Use background color" as a first option for the
Wallpaper combobox as well as correct handling of setting an invalid
bitmap, thus making the WindowManager draw the background color
2020-04-28 15:22:22 +02:00
Andres Vieira
b9df3c3318 FileManager: Disable PropertiesDialog custom rename disabling logic
TextBox already handles well its disabled state so it's no use to have a
way to prevent it from PropertiesDialog, too.
2020-04-28 15:14:02 +02:00
Andres Vieira
092e275633 FileManager: Disable permission checkboxes if user is not owner of path 2020-04-28 10:00:12 +02:00
Andres Vieira
cb118111b6 FileManager: Deny rename in PropertiesDialog if user can't write in path
The FileManager PropertiesDialog always let the user change the name of
files and folders to then be prompted with  write permissions error.

Now it checks for write permissions on the containing folder so it can
"disable" the TextBox input. We can't really disable TextBox right now,
hence the quotes.
2020-04-28 10:00:12 +02:00
Andres Vieira
1d874c03af FileManager: Disable delete action if user can't write in current path
Before this the delete action would be enabled in whenever was the case
in which the user had some selection made. This patch forces a check
to access() with the current folder path to see if the user actually can
delete nodes in it.
2020-04-28 10:00:12 +02:00
Andres Vieira
42f493ec9d FileManager: Add folder-specific paste action
This action is a bit different to the regular paste action because it
takes into account the folder in which the context menu was opened,
so it can be enabled/disabled whether that folder is writable or not for
the current user.

Both paste action use the same logic, now moved to the function
do_action(const GUI::Action&), but in the case of the folder being
right clicked, it pastes inside of it.
2020-04-28 10:00:12 +02:00
Andres Vieira
1f007181be FileManager: Disable paste action for non-writable directories 2020-04-28 10:00:12 +02:00
Andres Vieira
a1bcd9ca8a FileManager: Disables mkdir action if permissions don't allow it
Now the "New directory..." contextual menu is disabled if the current
user doesn't have enough permissions to create a node in the current
path.

This prevents the user going to the "New Directory" InputBox, writing
an appropriate name and accepting just to find they can't even do it :)
2020-04-28 10:00:12 +02:00
Andres Vieira
bf9926743a FileManager: Add paste action to DirectoryView's context menu 2020-04-27 11:21:24 +02:00
Andres Vieira
ef963dae7e FileManager: Paste inside folder if done through its context menu
Now FileManager will paste the clipboard contents inside a folder if the
paste action was clicked through a folder context menu, being the target
directory the selected folder.

This mimicks most of the behaviours that the different file managers
have.
2020-04-27 11:21:24 +02:00
Andres Vieira
91b70d34e7 FileManager: Copy and Delete selected file(s), not current folder
FileManager had this weird behaviour in which it would ignore the
current selection and try to copy and delete the current folder.
2020-04-27 11:21:24 +02:00
Hüseyin ASLITÜRK
089022e7f6 Applications: Add "thread" for HexEditor
HexEditor crashes during try OpenFile dialog.
2020-04-26 21:31:41 +02:00
Andres Vieira
88368df9a2 Base+Browser: Add an icon for the serenity Browser and make it use it
Browser was using the filetype-html icon instead of a dedicated one, so
we now have the globe from that icon reimagined and in good Buggie
company :^)
2020-04-26 21:13:57 +02:00
Hüseyin ASLITÜRK
679702045d QuickShow: Add gif files to navigation file list 2020-04-26 18:44:20 +02:00
Andres Vieira
1617be1e6f FileManager: Disable open_parent_directory_action if the new path is "/" 2020-04-26 15:26:01 +02:00
Andreas Kling
421619fe2f Browser: Rejig the "on_load_counter_change" hook when switching tabs
This feels a little shoddy, but we need to make sure that updates end
up on the right statusbar (since there is one statusbar per tab.)
2020-04-25 17:27:55 +02:00
Andreas Kling
9093625546 Browser: Unveil /etc/passwd so we can find our home directory if needed
Fixes #1952.
2020-04-25 17:21:59 +02:00
Andreas Kling
bd45b2b8d3 Browser: Share one BookmarksBarWidget between all Tabs 2020-04-25 17:20:23 +02:00
Brendan Coles
6dde2c7f47 Browser: Add Browser.ini configuration file
The Browser can now load a home page URL from the user's Browser.ini
configuration file rather than using a hard-coded URL.
2020-04-25 10:55:55 +02:00
Andreas Kling
260e4049ff Browser: Use the active tab's favicon as the window icon :^) 2020-04-24 22:47:53 +02:00
Andreas Kling
d6bbf12b7c LibGUI: Add "uniform tabs" mode to TabWidget (all tabs have same width)
...and enable this in the main Browser UI. :^)
2020-04-24 22:36:25 +02:00
Andreas Kling
682f0ac93b Browser: React to favicon notifications and put favicons in the tabs! 2020-04-24 22:28:05 +02:00
Andreas Kling
3fcfab4404 Browser: Move the "About" action to WindowActions 2020-04-24 20:50:06 +02:00
Andreas Kling
dfe8dea2ac Browser: Remove padding from the main TabWidget
This makes the active tab "take over" the whole window UI, even though
it's actually inside a TabWidget.
2020-04-24 20:42:34 +02:00
Andreas Kling
9d8620f956 Browser: Add icons for the "new tab" and "close tab" actions 2020-04-24 20:42:34 +02:00
Andreas Kling
9617b7ede4 FileManager: Set content margin of DirectoryView to same as children 2020-04-24 19:05:04 +02:00
Linus Groh
fd5f05079d QuickShow: Properly hide toolbar on toggle action
Similar to fullscreen mode we need to hide the toolbar's container.
2020-04-24 17:00:00 +02:00
Linus Groh
d86d73f6e8 QuickShow: Hide toolbar container in fullscreen mode
If we just hide the toolbar itself, its container is still visible and
taking up space at the top of the screen.
2020-04-24 17:00:00 +02:00
Andreas Kling
5c2bdbf27f Browser+LibWeb: Open link in new tab on Ctrl+Click :^) 2020-04-24 14:43:56 +02:00
Andreas Kling
d5d8e87d56 Browser: Scope tab-specific actions to the tab itself
This makes LibGUI choose the correct action depending on which tab
is currently active (technically which tab is *focused*.)

Fixes #1935.
2020-04-24 14:34:24 +02:00
Linus Groh
896decd4d5 Browser: Open links with target="_blank" in new tab 2020-04-24 14:34:11 +02:00
Linus Groh
061205b3b3 LibWeb: Pass link target to HtmlView's on_link_click callback 2020-04-24 14:34:11 +02:00
Andreas Kling
1b8b492258 Browser: Add "next tab" and "previous tab" actions
Now you can switch between the open tabs with Ctrl+PgUp and Ctrl+PgDn
2020-04-23 21:43:24 +02:00
Andreas Kling
312501f309 Browser: Add "Close tab" action (Ctrl+W) :^)
Note that this is a little bit unreliable with the keyboard shortcut
since LibGUI can get confused about which Action it's supposed to use
as each Browser::Tab has its own "close tab" action. This will need
to be fixed in LibGUI.
2020-04-23 21:36:17 +02:00
Andreas Kling
476a4475e5 Browser: Add "New tab" action (Ctrl+T) :^)
This also introduces a WindowActions collection of actions that are not
specific to the currently open tab, but nevertheless part of its menus.
2020-04-23 21:28:25 +02:00
Andreas Kling
4e8b6e48fd Browser: Start implementing tabbed browsing! :^)
This patch moves most of the Browser UI into a Tab class. The main UI
now mainly consists of a GUI::TabWidget that Tab objects are added to.

I'm going with the "tabs on top" style here, since I like how it makes
it feel like each tab has its own UI controls (which it actually does!)
2020-04-23 21:16:11 +02:00
Andreas Kling
029572b6fd Help: Sort the manual pages alphabetically
Fixes #1258.
2020-04-23 19:45:28 +02:00
Andreas Kling
2921793c01 QuickShow: Draw GUI::Frame parts of QSWidget
We were forgetting to draw the frame. :^)
2020-04-23 19:12:50 +02:00
Andreas Kling
3af8fcc839 HexEditor: Fill main widget with background to prevent gaps 2020-04-23 18:52:34 +02:00
Andreas Kling
2454c3b7fb Applications: Remove ChanViewer app
The HTTP JSON API this relied on is no longer available via HTTP and
I would rather make the website work in Browser anyway. :^)
2020-04-23 18:38:54 +02:00
Andreas Kling
0af5e0b9f8 Applications: Tweak main layout spacing and background 2020-04-23 18:30:59 +02:00
Andreas Kling
fa0bab843a SystemMonitor: Shrink margins of main layout 2020-04-23 17:54:59 +02:00
Andreas Kling
ab336e895f LibGUI: Add a ToolBarContainer widget and put most ToolBars in one
This mimics the Explorer toolbar container from Windows 2000 and looks
pretty neat! :^)
2020-04-23 17:44:49 +02:00
Andreas Kling
9ab9f97464 Browser: Remove no-op from the BooksmarksBarWidget
Widget::child_widgets() is a *copy* of the list of child widgets. :^)
2020-04-23 14:10:32 +02:00