Commit Graph

51 Commits

Author SHA1 Message Date
Andreas Kling
cfd6e6cc36 LibCore: Move GIODevice hierarchy from LibGUI to LibCore. 2019-04-10 20:22:23 +02:00
Andreas Kling
fc1d3074de LibCore: Move LibGUI/GNotifier to LibCore/CNotifier. 2019-04-10 17:35:43 +02:00
Andreas Kling
2f1f51b8ab LibCore: Move LibGUI/GObject to LibCore/CObject. 2019-04-10 17:01:54 +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
6d5a54690e LibGUI: Make GSocket connection asynchronous.
Now connect() will return immediately. Later on, when the socket is actually
connected, it will call GSocket::on_connected from the event loop. :^)
2019-04-08 04:56:11 +02:00
Andreas Kling
2580d4b911 IRCClient: Crash if server name resolution fails.
This is just so that I can catch it immediately. It obviously needs a bit of
work to feel right.
2019-04-02 20:42:59 +02:00
Andreas Kling
cc20eef7ef IRCClient: Ask the user which IRC server to connect to on startup. 2019-04-02 20:40:45 +02:00
Andreas Kling
eec0a64444 IRCClient: Fix wrong label in "Join channel" window. 2019-03-30 20:35:23 +01:00
Andreas Kling
74786f2d5a IRCClient: Use GSplitter in the window layouts.
This really brings the UI to life in a pleasant way. It's a bit annoying
that you can't initiate a resize by clicking on the shading of a splitter
resizer that actually belongs to the neighboring GFrame, I'm not sure how
to fix that yet but I'll think of something.
2019-03-30 13:57:34 +01:00
Andreas Kling
add38b3981 GModel: Add GModelIndex argument to row_count() and column_count().
This is in preparation for supporting hierarchical models.
2019-03-29 03:27:03 +01:00
Andreas Kling
34118aaaca IRCClient: Tweak size of window input boxes.
Now that GTextEditor is a GFrame, we need to make some room here for the
frame around the editor. :^)
2019-03-29 03:06:07 +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
7f1757b16c IRCClient: Exit the main loop when closing the app window. 2019-03-23 22:58:53 +01:00
Andreas Kling
994cf10b3e LibGUI: Rename GTableModel => GModel. 2019-03-23 01:42:49 +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
951377e93e GTableView: Add ability to hide individual columns at view-level.
Use this in IRCClient to hide the "sender" column in the server message view
since everything in that view comes from the "Server" anyway.
2019-03-20 13:36:07 +01:00
Andreas Kling
d17a91f185 Move WindowServer into Servers. 2019-03-20 04:34:14 +01:00
Andreas Kling
67009cee8e IRCClient: Add ability to change nickname. 2019-03-20 04:21:58 +01:00
Andreas Kling
f47945759b LibGUI: Make GTableModel a retainable object.
It became clear that this class needs to support multiple owners.
2019-03-20 03:27:07 +01:00
Andreas Kling
d0559c0e27 IRCClient: Scroll windows to bottom when new messages arrive.
This will need some tweaking to feel truly good, but this is already
better than just staying at the top while messages come in.
2019-03-19 03:09:51 +01:00
Andreas Kling
a0411f61f8 IRCClient: Make the IRCWindow input box look symmetrical. 2019-03-19 02:45:01 +01:00
Andreas Kling
31bc42c530 IRCClient: Ignore empty strings from the toolbar action input boxes. 2019-03-19 02:30:16 +01:00
Andreas Kling
c151b0370d IRCClient: Fix broken handling of RPL_WHOISIDLE. 2019-03-19 02:28:34 +01:00
Andreas Kling
f88e550998 LibGUI: More work on GInputBox.
- If the GInputBox has a parent and the parent is a GWindow, center the
  input box window within the parent window. This looks quite nice.

- Stop processing events in a nested event loop immediately after it's
  been asked to quit.

- Fix GWidget::parent_widget() behavior for non-widget parents.
2019-03-19 02:22:49 +01:00
Andreas Kling
a6538feed1 LibGUI: Add GInputBox for getting a string from a modal dialog.
Use this to implement some of the toolbar actions in IRCClient. :^)
2019-03-19 01:41:00 +01:00
Andreas Kling
43304d2adf WindowServer: Add special treatment for modal windows.
While a WSClientConnection has a modal window showing, non-modal windows
belonging to that client are not sent any events.
2019-03-19 00:52:39 +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
55aa819077 IRCClient: Colorize some channel messages (joins, parts, topics) 2019-03-18 20:56:45 +01:00
Andreas Kling
d7659ceebf IRCClient: Add support for a bunch of numerics, mostly WHOIS related. 2019-03-18 15:36:32 +01:00
Andreas Kling
8e3d0a23d5 LibGUI: Add GTCPSocket and base class GSocket (inherits from GIODevice.)
And use these to do the line-by-line reading automagically instead of having
that logic in IRCClient. This will definitely come in handy.
2019-03-18 14:09:58 +01:00
Andreas Kling
d466f2634d LibGUI: Add GTableModel::Role::ForegroundColor.
This makes it possible to specify the text color for each table cell.
Use this to make the IRCClient show unread window list items in red.
2019-03-18 04:54:07 +01:00
Andreas Kling
f44ba6a4c6 IRCClient: Add handling of some basic messages and commands. 2019-03-16 12:21:42 +01:00
Andreas Kling
b4f787090c IRCClient: Add a little "(n)" indicator to window list for unread messages. 2019-03-16 02:14:53 +01:00
Andreas Kling
1394677528 IRCClient: Refactor window creation responsibilities.
IRCChannel and IRCQuery objects now create their own windows with the
help of an aid_create_window callback provided by IRCAppWindow.

There's still a bit of murk but this is already an improvement.
2019-03-16 01:45:49 +01:00
Andreas Kling
fc7f700c20 IRCClient: Rename IRCClientWindowFoo => IRCWindowFoo. 2019-03-16 01:15:19 +01:00
Andreas Kling
5c2d405e1f IRCClient: Add menus. 2019-03-16 01:10:48 +01:00
Andreas Kling
2b6cf37d20 IRCClient: Add some more toolbar actions. Starting to look nice. 2019-03-16 00:21:11 +01:00
Andreas Kling
3a3aa74b2e IRCClient: Add a toolbar with some actions. 2019-03-15 23:24:40 +01:00
Andreas Kling
b54ab06595 GTableView: Add a way to turn off alternating row colors. 2019-03-15 21:41:27 +01:00
Andreas Kling
491aa112ab IRClient: Add a member list to channel views. 2019-03-15 18:25:51 +01:00
Andreas Kling
08c15be0ca IRCClient: Add ability to send query messages.
You can't open a query yet, but if someone starts one with you, you can
respond at least.
2019-03-15 18:02:38 +01:00
Andreas Kling
1fc283ed7d IRCClient+LibGUI: Add an input box so we can send messages to channels.
Implement this using a GTextEditor with a special single-line mode.
This new mode needs some polishing, but it's already very useful.
2019-03-15 17:37:13 +01:00
Andreas Kling
c1f2f5a153 LibGUI: Add a mode where GTableModel automatically activates on selection. 2019-03-15 16:25:30 +01:00
Andreas Kling
1089cd1378 IRCClient: Start using GStackWidget for the subwindows. 2019-03-15 16:12:51 +01:00
Andreas Kling
ab92252ee6 IRCClient: Hide all the table view headers. 2019-03-15 14:57:35 +01:00
Andreas Kling
a23dddc56f IRCClient: Use a model for the window list. 2019-03-15 14:01:04 +01:00
Andreas Kling
eba5fd3f46 IRCClient: Rename IRCSubWindow => IRCClientWindow. 2019-03-15 13:20:46 +01:00
Andreas Kling
f004db19d0 IRCClient: Put the unhandled server messages nicely into the server log. 2019-03-15 13:16:29 +01:00
Andreas Kling
850c7504a2 IRCClient: Hacking on IRCClient bringup. 2019-03-15 13:07:04 +01:00