No description
  • C 81.2%
  • HTML 6.3%
  • NSIS 4.8%
  • Perl 4.6%
  • M4 1.3%
  • Other 1.8%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Zach Bacon 3575a42693 Port the GTK frontend to GTK3; tray, notifications and single instance without GtkStatusIcon
GTK 3.22 or newer is now required (configure, pchat.spec, README).

GTK3 port
- Stock items become icon names and mnemonic labels. gtkutil maps the
  GTK2 stock ids that user menus still use to theme icon names, and
  adds helpers for icon menu items (replacing GtkImageMenuItem) and
  GtkTable-style GtkGrid layout.
- hbox/vbox, paned, separator, scrollbar, scale, button box, GtkMisc
  alignment and GtkAlignment move to their orientation-based or
  halign/valign forms; gtk_menu_popup becomes gtk_menu_popup_at_pointer.
- GtkStyle and RC strings are replaced by CSS. input_style_update()
  builds a pchat-text-style class from the palette and the text font,
  and input_style_apply() puts it on the input box, topic, key and limit
  entries, the user list and the channel tree. The font size goes out
  locale-independently, and a comma-separated family list is quoted per
  family. A pchat-compact class trims theme padding.
- Font and color selection use GtkFontChooserDialog and
  GtkColorChooserDialog. Only one font dialog is open at a time. Palette
  buttons are colored with per-button CSS, with readable text on them.
- List stores hold GdkRGBA (palette_get_rgba, one slot per color).
- Labelled buttons always show their image; GTK3 hides it by default.
- The tab bar scrolls in a scrollbar-less GtkScrolledWindow instead of
  a size-request hack. Touchpad (smooth) scrolling is accumulated into
  whole steps.
- Window opacity uses gtk_widget_set_opacity and is applied again once
  the window is mapped, which Windows otherwise resets.
- The drag-and-drop highlight is drawn in a draw handler. The drag
  icon snapshot uses gdk_pixbuf_get_from_window and stays off on Win32.

xtext
- Drawing goes into an off-screen cairo surface that ::draw copies out,
  since GTK3 doesn't allow drawing on the window outside the paint
  cycle. Scrolling swaps between two persistent surfaces instead of
  allocating one per line, and drawing queues only the area it touched.
- The widget repaints when it is realized, so a text area that is
  realized at its final size no longer stays black.
- GTK3 size requests, destroy and pointer APIs; the GdkWindow is
  registered with gtk_widget_register_window and the selection targets
  are added in realize. Both crashed on Wayland: on Connect, and when
  quitting.

Spell entry
- Underlines go through gtk_entry_set_attributes. Stale ones are cleared
  when no dictionaries are left. The expose and GtkObject destroy
  handlers are gone.

Single instance and remote control (GtkApplication)
- Startup runs a GtkApplication (org.pchat.PChat) with
  g_application_run; gtk_main is gone. The .desktop file is renamed to
  org.pchat.PChat.desktop, and the program name matches it, so the
  Wayland app_id and notifications match the installed file.
- Every PChat tries to be the primary instance. A second one hands its
  --url to the running PChat and exits when started with -e or with
  "Allow only one instance" on; otherwise it runs separately as before.
  That option is no longer Windows-only.
- Other programs on the session bus can only send irc:// or ircs://
  URLs (app.open-url). These are checked for a host, length and the
  absence of whitespace and control characters before /url sees them.
  Arbitrary commands (app.command, -e --command) are refused unless
  "Allow other programs to run commands" (net_remote_commands) is
  turned on in Settings > Advanced. It is off by default, and refusals
  don't open tabs.

Tray icon
- plugin-tray.c keeps the tray logic and builds its menu as a
  GMenuModel with GActions, including plugin /menu $TRAY entries
  (items, toggles, radio items, submenus). The platform side is
  tray-backend.h:
  - tray-sni.c: StatusNotifierItem with a com.canonical.dbusmenu menu
    over GDBus, for X11 and Wayland (Plasma, XFCE, LXQt, Budgie,
    Cinnamon; GNOME with the AppIndicator extension). It follows the
    panel coming and going, raises the window with the tray's
    xdg-activation token, and sets NeedsAttention while flashing.
  - tray-win32.c: Shell_NotifyIcon with a native popup menu. Windows
    now gets the full tray menu and re-adds the icon when Explorer
    restarts.
- GtkStatusIcon is gone, so XEmbed-only X11 trays no longer get an icon.
- The window is only hidden to the tray while a tray shows the icon.
  --minimize=2 waits for the tray, and the window comes back if the
  panel goes away. "Minimize to Tray" in the quit dialog and the
  minimize-to-tray option leave the window alone when there is no tray.

Notifications
- Balloons use GNotification on Linux, with clicking raising PChat, and
  the tray icon's balloon on Windows. libnotify is removed from the code
  and from configure.

Also link shell32 on Windows, add the new files to makefile.mak, and
share the network count and the tray backends' menu activation instead
of keeping copies.
2026-10-22 21:28:11 -04:00
build Rebrand to PChat, security hardening, and begin GTK2 cairo migration 2026-10-10 16:10:27 -04:00
data import the old source 2026-10-10 08:23:58 -04:00
dep-x86 import the old source 2026-10-10 08:23:58 -04:00
plugins Fix plugins on Windows; port the Python plugin to Python 3; fix Tcl plugin 2026-10-11 13:13:56 -04:00
po Modernize autotools; port ZoiteChat server list, login methods and SSL 2026-10-11 12:00:13 -04:00
src Port the GTK frontend to GTK3; tray, notifications and single instance without GtkStatusIcon 2026-10-22 21:28:11 -04:00
.gitignore Port the GTK frontend to GTK3; tray, notifications and single instance without GtkStatusIcon 2026-10-22 21:28:11 -04:00
acinclude.m4 import the old source 2026-10-10 08:23:58 -04:00
AUTHORS import the old source 2026-10-10 08:23:58 -04:00
autogen.sh Modernize autotools; port ZoiteChat server list, login methods and SSL 2026-10-11 12:00:13 -04:00
ChangeLog Rebrand to PChat, security hardening, and begin GTK2 cairo migration 2026-10-10 16:10:27 -04:00
config.h.linux Rebrand to PChat, security hardening, and begin GTK2 cairo migration 2026-10-10 16:10:27 -04:00
config.rpath Modernize autotools; port ZoiteChat server list, login methods and SSL 2026-10-11 12:00:13 -04:00
configure.ac Port the GTK frontend to GTK3; tray, notifications and single instance without GtkStatusIcon 2026-10-22 21:28:11 -04:00
COPYING import the old source 2026-10-10 08:23:58 -04:00
faq.html Rebrand to PChat, security hardening, and begin GTK2 cairo migration 2026-10-10 16:10:27 -04:00
HACKING Rebrand to PChat, security hardening, and begin GTK2 cairo migration 2026-10-10 16:10:27 -04:00
INSTALL Forgot to include these changes from the last commit 2026-10-10 09:55:51 -04:00
INSTALL.w32 Rebrand to PChat, security hardening, and begin GTK2 cairo migration 2026-10-10 16:10:27 -04:00
make.bat Rebrand to PChat, security hardening, and begin GTK2 cairo migration 2026-10-10 16:10:27 -04:00
Makefile.am Port the GTK frontend to GTK3; tray, notifications and single instance without GtkStatusIcon 2026-10-22 21:28:11 -04:00
Makefile.win32 Rebrand to PChat, security hardening, and begin GTK2 cairo migration 2026-10-10 16:10:27 -04:00
NEWS Rebrand to PChat, security hardening, and begin GTK2 cairo migration 2026-10-10 16:10:27 -04:00
org.pchat.PChat.desktop Port the GTK frontend to GTK3; tray, notifications and single instance without GtkStatusIcon 2026-10-22 21:28:11 -04:00
pchat.ico Rebrand to PChat, security hardening, and begin GTK2 cairo migration 2026-10-10 16:10:27 -04:00
pchat.png Rebrand to PChat, security hardening, and begin GTK2 cairo migration 2026-10-10 16:10:27 -04:00
pchat.spec Port the GTK frontend to GTK3; tray, notifications and single instance without GtkStatusIcon 2026-10-22 21:28:11 -04:00
README Port the GTK frontend to GTK3; tray, notifications and single instance without GtkStatusIcon 2026-10-22 21:28:11 -04:00
resource.h import the old source 2026-10-10 08:23:58 -04:00
SECURITY_AUDIT.md Rebrand to PChat, security hardening, and begin GTK2 cairo migration 2026-10-10 16:10:27 -04:00

PChat README
~~~~~~~~~~~~~
 X-Chat ("xchat") Copyright (c) 1998-2010 By Peter Zelezny.

 This program is released under the GPL v2 with the additional exemption
 that compiling, linking, and/or using OpenSSL is allowed. You may
 provide binary packages linked to the OpenSSL libraries, provided that
 all other requirements of the GPL are met. 
 See file COPYING for details.


What is it?
~~~~~~~~~~~
 PChat is an IRC client for UNIX operating systems. I.R.C. is Internet
 Relay Chat, see http://irchelp.org for more information about IRC in
 general. PChat runs on most BSD and POSIX compliant operating systems.


Requirements:
~~~~~~~~~~~~~
 * GTK 3.22 or newer (https://www.gtk.org)
 * Enchant 2 and libxml2, for spell checking

 PChat is known to work on, at least:

	* Linux
	* FreeBSD
	* OpenBSD
	* NetBSD
	* Solaris
	* AIX
	* IRIX
	* DEC/Compaq Tru64 UNIX
	* HP-UX 10.20 and 11
	* MacOS X
	* Windows XP/2000/Vista/7


Notes for packagers:
~~~~~~~~~~~~~~~~~~~~

 If you need your packages to work on i386, you don't need to compile with
 --disable-mmx, because it's also checked at run-time.


Python Scripts:
~~~~~~~~~~~~~~~
 Scripts for 1.8.x are not compatible, and a brand new interface has be
 written. Documentation can be found here: http://xchat.org/docs/.
 Consider using the Python interface for your scripts, it's a very nice
 API, allows for loading/unloading individual scripts, and gives you
 almost all the features of the C-Plugin API.


Perl Scripts:
~~~~~~~~~~~~~
 Scripts for 1.8.x are compatible with the following exceptions:

* IRC::command will not interpret %C, %B, %U etc.

* user_list and user_list_short:
  If a user has both op and voice, only the op flag will be 1.

* add_user_list/sub_user_list/clear_user_list
  These functions do nothing.

* notify_list
  Not implemented. Always returns an empty list.

* server_list
  Lists servers that are not connected aswell.

* Some print events may have new names and some were added.

* Text printed by scripts must now be UTF8.

* Text passed to scripts (via add_message_handler) will be encoded in UTF8.


Autoloading Perl Scripts and Plugins
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 * PChat automatically loads, at startup:
	~/.pchat/*.pl Perl scripts
	~/.pchat/*.py Python scripts
	~/.pchat/*.so Plugins
	$(libdir)/pchat/plugins/*.so plugins
	(this usually translates to /usr/lib/pchat/plugins/*.so)


Control Codes:
~~~~~~~~~~~~~~
 %%     -  A single percentage sign
 %C     -  Control-C (mIRC color code)
 %B     -  Bold Text
 %U     -  Underline Text
 %R     -  Reverse Text
 %O     -  Reset all Text attributes
 %XXX   -  ASCII XXX (where XXX is a decimal 3 digit number)
           (Eg: %007 sends a BEEP)

 %Cforeground,background will produce a color code, eg: %C03,10

 These are now disabled by default (see Settings > Prefs > Input Box).
 Instead you can insert the real codes via ctrl-k, ctrl-b and ctrl-o.