diff --git a/README.md b/README.md index 3f60b9a..5240d5e 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,8 @@ Protocols natively supported include IRC and XMPP. Protocols generally supported through libpurple include GroupWise, Zephyr, and [others through plugins](https://pidgin.im/plugins/?type=Protocol). +You can find the user documentation [here](http://htmlpreview.github.io/?https://github.com/JadedCtrl/Chat-O-Matic/master/documentation/Documentation.html). + ## Building You can make Chat-O-Matic and its protocols with: diff --git a/application/AppMessages.h b/application/AppMessages.h index 0975e08..f1090f0 100644 --- a/application/AppMessages.h +++ b/application/AppMessages.h @@ -8,6 +8,9 @@ //! Show settings window const uint32 APP_SHOW_SETTINGS = 'RPST'; +//! Show documentation +const uint32 APP_SHOW_HELP = 'Rhlp'; + //! Show accounts window const uint32 APP_SHOW_ACCOUNTS = 'RPac'; diff --git a/application/windows/MainWindow.cpp b/application/windows/MainWindow.cpp index a04746f..fe1e53c 100644 --- a/application/windows/MainWindow.cpp +++ b/application/windows/MainWindow.cpp @@ -1,13 +1,14 @@ /* * Copyright 2009-2011, Andrea Anzani. All rights reserved. * Copyright 2009-2011, Pier Luigi Fiorini. All rights reserved. - * Copyright 2021, Jaidyn Levesque. All rights reserved. + * Copyright 2021-2022, Jaidyn Levesque. All rights reserved. * Distributed under the terms of the MIT License. * * Authors: * Andrea Anzani, andrea.anzani@gmail.com * Pier Luigi Fiorini, pierluigi.fiorini@gmail.com * Jaidyn Levesque, jadedctrl@teknik.io + * Humdinger, humdingerb@gmail.com */ #include @@ -16,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -278,6 +280,28 @@ MainWindow::MessageReceived(BMessage* message) fListView->RemoveAccount(message->GetInt64("instance", -1)); break; } + case APP_SHOW_HELP: + { + BPathFinder pathFinder; + BStringList paths; + BPath path; + BEntry entry; + + status_t error = pathFinder.FindPaths(B_FIND_PATH_DOCUMENTATION_DIRECTORY, + "packages/chat_o_matic", paths); + + for (int i = 0; i < paths.CountStrings(); ++i) { + if (error == B_OK && path.SetTo(paths.StringAt(i)) == B_OK + && path.Append("Documentation.html") == B_OK) + { + entry = path.Path(); + entry_ref ref; + entry.GetRef(&ref); + be_roster->Launch(&ref); + } + } + break; + } case IM_MESSAGE: ImMessage(message); break; @@ -522,6 +546,8 @@ MainWindow::_CreateMenuBar() BMenu* programMenu = new BMenu(B_TRANSLATE("Program")); programMenu->AddItem(new BMenuItem(B_TRANSLATE("About" B_UTF8_ELLIPSIS), new BMessage(B_ABOUT_REQUESTED))); + programMenu->AddItem(new BMenuItem(B_TRANSLATE("Help" B_UTF8_ELLIPSIS), + new BMessage(APP_SHOW_HELP))); programMenu->AddItem(new BMenuItem(B_TRANSLATE("Preferences" B_UTF8_ELLIPSIS), new BMessage(APP_SHOW_SETTINGS), ',', B_COMMAND_KEY)); programMenu->AddItem(new BSeparatorItem()); diff --git a/README.ADDON.md b/documentation/ADDON-WRITING.md similarity index 100% rename from README.ADDON.md rename to documentation/ADDON-WRITING.md diff --git a/documentation/Documentation.html b/documentation/Documentation.html new file mode 100644 index 0000000..be96bf7 --- /dev/null +++ b/documentation/Documentation.html @@ -0,0 +1,301 @@ + + + + + Chat-O-Matic Documentation + + + +
+

+ + Chat-O-Matic Documentation +

+
+ +

Chat-O-Matic is a multi-protocol chat program based on + Caya, which has its own roots in the + IM kit project. Several protocols are supported, + including IRC, + XMPP, and more through + libpurple. + +

+ + +
+

Main window

+ + + + +
+

Room list

+ + +

Lists all joined chats that are attached to the current window, ordered by account. + Clicking a chat will select it, changing the text buffer, + user-list, and room header. If you + click on an account's list item, then that account's logs will be shown instead: This + might include anything from MOTDs to error messages, + depending on the protocol.

+ +
+

Room options

+

If you right-click on a room's list item, you can toggle several per-room options, + including:

+ + + + + + + + + + + + +
FlagDescriptionDefault
Auto-joinIf the room will be joined after every start-up
Log messagesWhether or not messages will be logged to disk
Notify on every messageNotify if any message is sent to the room
Notify on direct-messagesNotify if the user is mentioned, or if message received in one-on-one + chat
+
+
+ +
+

Room header

+ + + +

This little section displays a room's name, topic, and icon.

+

If you have permission to, you can also change a room's topic by clicking on the topic + text, typing what you'd like it to be, and hitting ENTER. After + hitting ENTER, the text will change back to the previous topic, + pending the protocol or server— after which it will update to the new topic.

+

Here, the room name is “#haiku” and the topic “Open-source operating system […].”

+
+ +
+

User list

+ + + +

This area has a calm, undemanding job— show a list of users in the room. On + right-clicking a user item, you'll see a pop-up menu with at least User info…. + +

+

Moderation

+

Depending on your user's permissions, you might see more than User info… in the + user-list pop-up menus: Ban user, Kick user, Mute user, + Deafen user, and their reciprocals (Unmute user, Undeafen user).

+ +

By moderating through this right-click menu, though, you can't attach a message— + sometimes, for example, it's useful to give the victim a reason that you've kicked them + in the shins. For that, you can moderate through commands as well.

+
+ +
+

Chat input

+ + + +

With the text-box, you can send messages and run commands. Type what you like, and hit + ENTER to send. If you're typing someone's username or nickname, + hitting TAB can auto-complete it.

+

Messages don't necessarily have to be only one line long— hence why you can resize the + text-box. ALTENTER starts a new line. If + you get lost, Page↑ and Page↓ are your + friends.

+ +
+

Commands

+

Commands let you perform some special action— they vary by protocol, but there are + some standard ones you can expect to work:

+ + + + + + + + + + + +
CommandDescription
/helpList all commands for the current protocol
/invite USERInvite a user to the current room
/kick USER MESSAGEDisconnect a user from the current room
/ban USER MESSAGEDisconnect a user and prevent them from re-joining
/unban USERUndo a user's ban
/deafen USERPrevent a user from receiving any messages
/undeafen USERUndo a user's deafening
/mute USERPrevent a user from sending messages
/unmute USERUndo a user's muting
+

As you might be able to tell, most of these are just aliases for + moderation through the user list.

+
+
+ +
+

Status area

+ + + +

In the status area, you can see your avatar (how cute!), change your nickname, and update + your current status.

+

Clicking on the nickname text-box (here it's “jaidedim”), you can then edit your nickname, + hitting ENTER to update. After hitting + ENTER, the text will change back to your previous nickname, pending + the protocol or server— after which it will update to the new nickname.

+

The status drop-down menu lets you change the status for the currently selected account + (here it's “Available”).

+

There is, next to the status menu, an account menu. By default “All” (the asterisk) is + selected, meaning that any changes to status or nickname will apply to all accounts. If + you'd like to change the nick or status of only a single account, you can select it from + this menu.

+
+ + +
+ + + + +

In the Program menu, you'll find: +

+

+ +

In the Accounts menu, you'll find a list of your accounts for + easy management. Through this menu, you can also select the Accounts→Manage accounts… + item to see the account management window, which lets you add and remove accounts.

+ +

In the Chat menu, you'll find: +

+ Chat→Find… (ALTF) will open a + TextSearch window for searching the current room's logs (so long as logging + is enabled). The other items are related to + room creation/joining. +

+ +

In the Roster menu, you'll find: +

    +
  • Edit roster…
  • +
  • Invite user…
  • +
+ +

In the Window menu, you'll find two items that make switching between rooms + faster— Window→Up (ALT) and + Window→Down (ALT).

+
+
+ + +
+

Preferences window

+ + + +

Selecting Program→Preferences through the menu-bar (ALT + ,), you'll see the Preferences window. Most of the options should + be self-explanatory, but there a couple that are noteworthy:

+ +

The Notifications tab lets you toggle whether or not you receive message-related + notifications and whether or not you'll be notified on a connection/disconnection.

+ +

You can also attach specific sounds to notifications through Haiku's Sounds + preferences, brought up through the Edit sounds… button. The beeps configurable + through Sounds are Chat-O-Matic mention and Chat-O-Matic message.

+
+ + +
+

Roster/user windows

+ + + +

Roster and user-selection windows (as in Roster→Edit roster…, + Roster→Invite user… and Chat→New chat… from the + menu-bar) display a list of your contacts, + allowing you to select one.

+ +

Through the account drop-down menu in the + bottom-left corner, you can filter the list, showing only contacts + of a specific account. In this example, “jaidedim-xmpp“, an XMPP + account, is selected.

+ +

By typing into the text-box at the top of the window, you can search + through the shown contacts— here, all contacts matching “Ash” are + shown. If you have an account selected, you can also use this text-box + to manually type in a username for selection. In this window, since + a specific account is selected, “Select user Ash…” is an item in the + list.

+
+ + +
+

Room creation/join windows

+ + + +

With Chat→Join room… and Chat→New room… in the + menu-bar (ALTJ and + ALTN, respectively), you'll see a window + like the one above. For each protocol, the options and text-boxes shown will differ— for + IRC, as in this image, the only option is the + channel-name.

+ +

You can select the account to join/create from through the account drop-down menu in the + bottom-left corner. Here, the account “oftc-irc” is selected, an + IRC account.

+ +

Chat→Create chat… (ALTM), in + contrast, is used for creating one-on-one chats, and opens a + user-selection window instead.

+
+ + +
+

Room directory

+ + + +

The room directory (accessible though Chat→Room directory… in the + menu-bar) lets you browse and join publically listed chatrooms— a + feature used extensively for IRC, + XMPP, and some libpurple + add-ons.

+ +

Like other dialogues in Chat-O-Matic, you can select a specific account to act on though + the bottom-left account dropdown menu. In this image, “All” accounts is selected, so rooms + available to all the user's accounts are shown.

+
+ + + diff --git a/documentation/img/AppIcon.png b/documentation/img/AppIcon.png new file mode 100644 index 0000000..4c634e2 Binary files /dev/null and b/documentation/img/AppIcon.png differ diff --git a/documentation/img/chat-header.png b/documentation/img/chat-header.png new file mode 100644 index 0000000..c50fc57 Binary files /dev/null and b/documentation/img/chat-header.png differ diff --git a/documentation/img/chat-input.og.png b/documentation/img/chat-input.og.png new file mode 100644 index 0000000..0bb9b76 Binary files /dev/null and b/documentation/img/chat-input.og.png differ diff --git a/documentation/img/chat-input.png b/documentation/img/chat-input.png new file mode 100644 index 0000000..449b4c8 Binary files /dev/null and b/documentation/img/chat-input.png differ diff --git a/documentation/img/chat-list.og.png b/documentation/img/chat-list.og.png new file mode 100644 index 0000000..b36f08f Binary files /dev/null and b/documentation/img/chat-list.og.png differ diff --git a/documentation/img/chat-list.png b/documentation/img/chat-list.png new file mode 100644 index 0000000..b189902 Binary files /dev/null and b/documentation/img/chat-list.png differ diff --git a/documentation/img/menu-bar.png b/documentation/img/menu-bar.png new file mode 100644 index 0000000..df57498 Binary files /dev/null and b/documentation/img/menu-bar.png differ diff --git a/documentation/img/pref-behavior.og.png b/documentation/img/pref-behavior.og.png new file mode 100644 index 0000000..4437f06 Binary files /dev/null and b/documentation/img/pref-behavior.og.png differ diff --git a/documentation/img/pref-behavior.png b/documentation/img/pref-behavior.png new file mode 100644 index 0000000..9e4087a Binary files /dev/null and b/documentation/img/pref-behavior.png differ diff --git a/documentation/img/pref-notifications.og.png b/documentation/img/pref-notifications.og.png new file mode 100644 index 0000000..a6ea293 Binary files /dev/null and b/documentation/img/pref-notifications.og.png differ diff --git a/documentation/img/pref-notifications.png b/documentation/img/pref-notifications.png new file mode 100644 index 0000000..b25ac05 Binary files /dev/null and b/documentation/img/pref-notifications.png differ diff --git a/documentation/img/room-creation.png b/documentation/img/room-creation.png new file mode 100644 index 0000000..495ba20 Binary files /dev/null and b/documentation/img/room-creation.png differ diff --git a/documentation/img/room-directory.png b/documentation/img/room-directory.png new file mode 100644 index 0000000..b6d43fd Binary files /dev/null and b/documentation/img/room-directory.png differ diff --git a/documentation/img/select-user.png b/documentation/img/select-user.png new file mode 100644 index 0000000..0a6b909 Binary files /dev/null and b/documentation/img/select-user.png differ diff --git a/documentation/img/status-area.png b/documentation/img/status-area.png new file mode 100644 index 0000000..be09a82 Binary files /dev/null and b/documentation/img/status-area.png differ diff --git a/documentation/img/user-list.og.png b/documentation/img/user-list.og.png new file mode 100644 index 0000000..555b271 Binary files /dev/null and b/documentation/img/user-list.og.png differ diff --git a/documentation/img/user-list.png b/documentation/img/user-list.png new file mode 100644 index 0000000..0a900ba Binary files /dev/null and b/documentation/img/user-list.png differ diff --git a/documentation/img/window.og.png b/documentation/img/window.og.png new file mode 100644 index 0000000..fce0ea8 Binary files /dev/null and b/documentation/img/window.og.png differ diff --git a/documentation/img/window.png b/documentation/img/window.png new file mode 100644 index 0000000..fce0ea8 Binary files /dev/null and b/documentation/img/window.png differ diff --git a/documentation/style.css b/documentation/style.css new file mode 100644 index 0000000..274a02e --- /dev/null +++ b/documentation/style.css @@ -0,0 +1,22 @@ +/* SPCSS theme by Susam Pal, under the MIT license + * https://github.com/susam/spcss */ +body{color:#333;font-family:helvetica,arial,sans-serif;line-height:1.5;margin:0 auto;max-width:40em;padding:0 1em}h1,h2,h3,h4,h5,h6{margin:1.25em 0 .5em;line-height:1.2}a:link{color:#00e}a:visited{color:#518}a:focus,a:hover{color:#03f}a:active{color:#e00}h1 a:empty:before,h2 a:empty:before,h3 a:empty:before,h4 a:empty:before,h5 a:empty:before,h6 a:empty:before{content:"#"}h1 a:empty,h2 a:empty,h3 a:empty,h4 a:empty,h5 a:empty,h6 a:empty{visibility:hidden;padding-left:.25em}h1:hover a:empty,h2:hover a:empty,h3:hover a:empty,h4:hover a:empty,h5:hover a:empty,h6:hover a:empty{visibility:visible}img{max-width:100%}figure{margin:1em 0;text-align:center}figcaption{font-size:small}code,kbd,pre,samp{color:#009;font-family:monospace,monospace}pre kbd{color:#060}blockquote,pre{background:#eee;padding:.5em}pre{overflow:auto}blockquote{border-left:medium solid #ccc;margin:1em 0}blockquote :first-child{margin-top:0}blockquote :last-child{margin-bottom:0}table{border-collapse:collapse}td,th{border:thin solid #999;padding:.3em .4em;text-align:left}@media (prefers-color-scheme:dark){body{background:#111;color:#bbb}a:link{color:#9bf}a:visited{color:#caf}a:focus,a:hover{color:#9cf}a:active{color:#faa}code,kbd,pre,samp{color:#6cf}pre kbd{color:#9c6}blockquote,pre{background:#000}blockquote{border-color:#333}td,th{border-color:#666}} + +/* + * Copyright 2008-2017, Haiku. All rights reserved. + * Distributed under the terms of the MIT License. + */ +.key { /* Shortcut (separate with */ + -webkit-border-radius: 3px; + -khtml-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + border-color: #c7c7c7; + border-style: solid; + border-width: 1px; + padding: 0px 2px 0px 2px; + background-color: #e8e8e8; + font-family: serif; + font-variant: small-caps; + font-size: 0.8em; +}