Commit Graph

848 Commits

Author SHA1 Message Date
Patrick Griffis c48afe3799 Be even more picky about invalid URLs 2023-03-14 21:22:01 -05:00
konsolebox 67b25fddf1
Add option to exclude nickname in window title (#2759) 2023-01-24 17:03:53 -06:00
Andreas Schärtl bd4290a1a9 Support whitespace between language codes
So far, when configuring multiple spell check languages, Hexchat
requires the user to separate multiple entries with commas and
only commas. This patch allows users to also enter whitespace, e.g.

  de_DE, en_US

as is common in many applications.
2022-09-20 18:08:37 -05:00
Sadie Powell 46c9df1863 Fix various compiler warnings.
fish.c: -Wincompatible-pointer-types
fkeys.c: -Wmisleading-indentation
proto-irc.c: -Wincompatible-pointer-types
util.c: -Wdeprecated-declarations
xtext.c: -Wmaybe-uninitialized
2022-08-29 13:50:03 -05:00
Adrian 20c50fd7ef notification_plugin_deinit: Set function signature to int(void *)
Previously the function signature was inconsistent throughout
src/fe-gtk/plugin-notification.{h,c}: One file had the signature
int(void), while the other had int(void *). Since this type mismatch
might lead to problems (especially with LTO) and the (possibly provided)
function argument isn't used in the function's definition, this commit
sets int(void *) as function signature for both the declaration and
definition of the function.

Fixes: https://github.com/hexchat/hexchat/issues/2726
2022-08-26 12:40:15 -05:00
Patrick Griffis 13b6a40b9c Change preferences sub-dialogs to be modal
This solves the issue where the parent dialog is closed and then
the child dialog is used.

This is however only a partial fix:

- Many other dialogs throughout the codebase do not currently have
  parent windows and need to be refactored.

- Not all window managers respect modal so users can still trigger
  bugs. We can be more defensive against this but it requires more
  refactoring.

Closes #2686
2022-04-16 18:41:34 -05:00
Patrick d99a98ff4c
notification: Don't print failure to load backend in UI
This isn't actually helpful information to users generally

Closes #2152
Closes #2684
2022-03-26 11:18:00 -05:00
Patrick d936b653ac
Add missing header
https://github.com/hexchat/hexchat/issues/2652#issuecomment-1007015314
2022-01-06 20:36:14 -06:00
Patrick Griffis 66f5968225 Update comment 2021-12-22 12:05:08 -06:00
Patrick Griffis ba5d79b496 Be smarter about conditionally escaping URIs that are opened
Fixes #2659
2021-12-22 11:50:36 -06:00
Nolan Lum 9039a5d75b
Add -NOOVERRIDE flag to GUI COLOR. (#2644) 2021-10-14 09:44:11 -05:00
Patrick Griffis 2985dde7f0 Explicitly set app icon in notifications 2021-10-01 11:56:49 -05:00
Patrick Griffis 91439f04c0 Fix whitespace issues 2021-07-13 12:30:47 -05:00
Patrick Griffis c144d0468b Remove libnotify dependency
Instead just talk directly to the service. This fixes *sending*
a notification being blocking IO.
2021-07-13 12:26:34 -05:00
Patrick Griffis cbb0927a7a build: Misc cleanup of options
Cleanup of option names, use features where applicable, and printing
of summary.
2021-07-13 11:26:59 -05:00
Michael Catanzaro 25440a07c3 Avoid direct use of libproxy
Since hexchat already depends on GLib, it's better to use GProxyResolver
instead. This might use libproxy, or not, as appropriate.

P.S. This removes a memory safety issue because proxy_list is allocated
using malloc(), not g_malloc(), and therefore using g_strfreev() is
incorrect. The proper way to free the proxy list returned by libproxy
is to use px_proxy_factory_free_proxies() (but nobody does that because
it was added in libproxy 0.4.16, which is somewhat recent).
2021-07-12 11:29:15 -05:00
Patrick Griffis 869a8d7ab3 Fix allowed characters when escaping URIs
Closes #2608
2021-07-10 11:35:35 -05:00
Sadie Powell 55e4f1c42e Implement support for strikethrough text.
https://defs.ircdocs.horse/info/formatting.html
2021-06-20 10:39:39 -05:00
Sadie Powell 623d93c6f1 Switch back to using newserver as the default server name. 2021-06-17 19:47:34 -05:00
Sadie Powell 747a52aae8 Default new servers to use TLS if built with OpenSSL. 2021-06-17 19:47:34 -05:00
Patrick Griffis 1f5c95d9e9 Always pass a valid URI to gtk_show_uri()
This can fix issues like a crash when invalid characters get passed
through.
2021-06-17 15:22:40 -05:00
BakasuraRCE da26097aab notification: Implement notification option for channels 2021-05-23 21:17:07 -05:00
Patrick Griffis d3545f37cd Change default network to Libera.Chat 2021-05-23 21:15:52 -05:00
DjLegolas e2ec2c9ab7 Fixed notifications-winrt compilation error
Both platform.winmd and windows.winmd were unable to find so added the location of each to the compiler.
2021-05-23 19:43:24 -05:00
DjLegolas 939ec7a16e Updated Toolset to v142 2021-05-23 19:43:24 -05:00
Sadie Powell f0554b27df
Add a workaround for icons not scaling right on HiDPI screens. (#2573) 2021-05-23 13:01:39 -05:00
John Levon 163608d7fd
Use pango_font_metrics_get_height() to calculate font height (#2500) 2020-09-07 18:53:31 +02:00
Paul Wise 71eb79fee4 Hide Focus Channel when the selected channel is already focussed
When the channel is focussed, the menu item does nothing so
it isn't useful to have it in the menu.

Fixes: commit c361bdca6a
See-also: https://github.com/hexchat/hexchat/pull/2255#issuecomment-475841824
2020-08-05 18:12:31 +02:00
delthas 83daed8706 win32: Fix building executables with invalid entrypoints
Windows builds of the GTK frontend use the pie flag to compile
hexchat.exe. Windows needs an explicit entrypoint when compiling with
--pie, otherwise an invalid executable is created.

This sets the entrypoint of the executable on Windows (as it is
currently set in the Visual Studio project files).

This fixes a critical build issue which prevents all Windows builds
using Meson from working.
2020-04-19 16:12:42 -07:00
delthas 5d5838e712 win32: Replace include of winuser.h with windows.h
winuser.h should never be included directly. windows.h should be included instead.

This fixes a critical build issue added in c5d47fc which makes all MinGW builds fail.

See #2403.
2020-04-19 03:02:29 -07:00
Paul Wise c361bdca6a Add a channel context menu item to focus channels 2019-12-30 18:14:53 -08:00
Patrick Griffis eeada79a64 build: Fix some meson warnings 2019-12-20 22:24:30 -08:00
Zach Bacon d9809f2787 Add missing winuser.h include for mingw (#2403)
Without the include gcc will complain about WM_TIMECHANGE as undeclared.
2019-12-16 00:42:31 -08:00
cajuncooks c1091c38b8 Extend input box GTK theme workaround to include Yaru
Fixes #2305
2019-02-25 19:13:24 -05:00
Rainer Müller 5ca767f7f8 Fix plugins on macOS
The switch to the meson build system broke plugins on macOS. GNU libtool
builds shared libraries with ".dylib" and shared modules (plugins) with
the extension ".so", but meson is using ".dylib" for both.

Although overriding the name_suffix for shared_module() in meson is
possible, this would be messy for other platforms as there is no way to
query the default. Therefore it seems like we have to go with ".dylib"
for now on macOS.

However, G_MODULE_SUFFIX is defined to ".so", because glib follows what
GNU libtool does. Therefore define a separate preprocessor macro that
has the correct extension.

See: https://github.com/mesonbuild/meson/issues/1160
2018-03-31 01:29:05 +00:00
Manuel Schneider ee85129a9b Deiconify window on tray click. Closes #2136 2018-03-20 11:32:02 +00:00
Patrick Griffis dc483b2342 Remove shift+click to close tab binding
It is an odd binding that conflicts with typical behavior
where shift click selects multiple items and there is
already the middle click shortcut to close tabs quickly.

Closes #918
2018-03-16 20:33:52 -04:00
Patrick Griffis eb942fc274 Revert "xtext: Always use Pango to get correct glyph width on Unix"
This reverts commit d3f1ab7813.

The performance even on Linux is just too poor in many cases.
2018-03-13 21:18:16 -04:00
Patrick Griffis 541b9ca744 win32: Update to build against gvsbuild 2018-03-09 20:26:41 +00:00
Patrick Griffis e9b9ff9f38 Various fixes for mingw 2018-03-09 18:23:25 +00:00
Mark Jansen 9b8a7eaa01 win32: Respond to WM_TIMECHANGE by updating the CRT timezone info
Closes #2090
Fixes #1851
2018-03-09 13:24:08 -05:00
Patrick Griffis 7510ab36b7 xtext: Fix accidental truncation
Fixes #2121
2018-02-11 17:24:32 -05:00
Peng Wu d3f1ab7813 xtext: Always use Pango to get correct glyph width on Unix
This should be slower but pango seems to be reasonably fast
on Unix though extremely slow on Windows.

https://bugzilla.redhat.com/show_bug.cgi?id=1536298
2018-02-06 17:06:50 -05:00
Patrick Griffis 4cdf6460b6 xtext: Fix invalid utf-8 from truncation 2018-02-06 17:06:50 -05:00
Patrick Griffis 5d3bf39103 xtext: Remove unused code 2018-02-06 17:06:50 -05:00
Patrick Griffis 234fe86987 Fix Enchant 2.1.3+ support
They changed the lib name yet again...

Closes #2117
2018-02-06 16:57:30 -05:00
Rodri 4a228d1efe This patch hopefully solves a bug that causes that when a tab (channel or private) is left with the scrollbar at the bottom, and some new text arrives, and then we select again that tab, sometimes the scrollbar is not completely down and there is hidden text and we have to scroll manually to the bottom to show all text.
This was previously submitted as an issue in: https://github.com/hexchat/hexchat/issues/1948
Maybe it isn't the ideal way to solve it, but at least I tested it and it seems to work.
2018-01-18 15:07:14 -05:00
Francisco Couzo ee8926503c Prevent undefined behaviour on memcpy 2018-01-18 04:49:10 -05:00
Patrick Griffis 7d7be83216 Rename app-id to io.github.Hexchat
RDNS syntax is recommended for applications and this matches the
existing flatpak. Note that the dbus service and icons still need
renaming though the former is an API breakage.

Closes #2104
Closes #2103
2017-12-24 13:00:40 -05:00
Patrick Griffis 0058587958 spell-entry: Improve robustness of enchant loading and fix 2.0 support
- Add logging and error handling to loading symbols
- Don't load unversioned symbol
- Handle new function names in Enchant 2.0

Closes #2095
2017-11-24 03:56:53 -05:00