From c1091c38b83ea4267c034817e6b2560e2c54daa3 Mon Sep 17 00:00:00 2001 From: cajuncooks Date: Mon, 25 Feb 2019 10:03:56 -0700 Subject: Extend input box GTK theme workaround to include Yaru Fixes #2305 --- src/fe-gtk/fe-gtk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/fe-gtk') diff --git a/src/fe-gtk/fe-gtk.c b/src/fe-gtk/fe-gtk.c index 9d068a1b..ee3e847c 100644 --- a/src/fe-gtk/fe-gtk.c +++ b/src/fe-gtk/fe-gtk.c @@ -293,10 +293,10 @@ create_input_style (GtkStyle *style) GtkSettings *settings = gtk_settings_get_default (); char *theme_name; - /* gnome-themes-standard 3.20 relies on images to do theming + /* gnome-themes-standard 3.20+ relies on images to do theming * so we have to override that. */ g_object_get (settings, "gtk-theme-name", &theme_name, NULL); - if (g_str_has_prefix (theme_name, "Adwaita")) + if (g_str_has_prefix (theme_name, "Adwaita") || g_str_has_prefix (theme_name, "Yaru")) gtk_rc_parse_string (adwaita_workaround_rc); g_free (theme_name); -- cgit 1.4.1 From d9809f27873a54fb71b6d7366401e848dc3ac2b3 Mon Sep 17 00:00:00 2001 From: Zach Bacon Date: Mon, 16 Dec 2019 03:42:31 -0500 Subject: Add missing winuser.h include for mingw (#2403) Without the include gcc will complain about WM_TIMECHANGE as undeclared. --- src/fe-gtk/maingui.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/fe-gtk') diff --git a/src/fe-gtk/maingui.c b/src/fe-gtk/maingui.c index efeaaaeb..604ad3c8 100644 --- a/src/fe-gtk/maingui.c +++ b/src/fe-gtk/maingui.c @@ -53,6 +53,10 @@ #include "sexy-spell-entry.h" #include "gtkutil.h" +#ifdef G_OS_WIN32 +#include +#endif + #define GUI_SPACING (3) #define GUI_BORDER (0) -- cgit 1.4.1 From eeada79a64b7188f2f820cd45328cf2daa20f9e2 Mon Sep 17 00:00:00 2001 From: Patrick Griffis Date: Fri, 20 Dec 2019 22:24:30 -0800 Subject: build: Fix some meson warnings --- meson.build | 2 -- src/fe-gtk/meson.build | 9 +++------ 2 files changed, 3 insertions(+), 8 deletions(-) (limited to 'src/fe-gtk') diff --git a/meson.build b/meson.build index 17e73795..2c849482 100644 --- a/meson.build +++ b/meson.build @@ -91,8 +91,6 @@ endif global_cflags = [] test_cflags = [ - '-pipe', - '-fPIE', '-funsigned-char', '-Wno-conversion', '-Wno-pointer-sign', diff --git a/src/fe-gtk/meson.build b/src/fe-gtk/meson.build index f11580bb..1fe741ee 100644 --- a/src/fe-gtk/meson.build +++ b/src/fe-gtk/meson.build @@ -39,13 +39,9 @@ if gtk_dep.get_pkgconfig_variable('target') == 'x11' hexchat_gtk_deps += dependency('x11') endif -hexchat_gtk_cflags = [ - '-fPIE' -] +hexchat_gtk_cflags = [] -hexchat_gtk_ldflags = [ - '-pie' -] +hexchat_gtk_ldflags = [] if get_option('with-libnotify') hexchat_gtk_sources += 'notifications/notification-libnotify.c' @@ -89,6 +85,7 @@ executable('hexchat', dependencies: hexchat_gtk_deps, c_args: hexchat_gtk_cflags, link_args: hexchat_gtk_ldflags, + pie: true, install: true, gui_app: true, ) -- cgit 1.4.1 From c361bdca6afdc933eeac35732334464990295cd4 Mon Sep 17 00:00:00 2001 From: Paul Wise Date: Sat, 6 Oct 2018 10:52:28 +0800 Subject: Add a channel context menu item to focus channels --- src/fe-gtk/menu.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/fe-gtk') diff --git a/src/fe-gtk/menu.c b/src/fe-gtk/menu.c index 097093b4..aba3d745 100644 --- a/src/fe-gtk/menu.c +++ b/src/fe-gtk/menu.c @@ -1001,6 +1001,18 @@ menu_chan_part (GtkWidget * menu, char *chan) } } +static void +menu_chan_focus (GtkWidget * menu, char *chan) +{ + char tbuf[256]; + + if (current_sess) + { + g_snprintf (tbuf, sizeof tbuf, "doat %s gui focus", chan); + handle_command (current_sess, tbuf, FALSE); + } +} + static void menu_chan_join (GtkWidget * menu, char *chan) { @@ -1035,6 +1047,8 @@ menu_chanmenu (struct session *sess, GdkEventButton * event, char *chan) str_copy); else { + menu_quick_item_with_callback (menu_chan_focus, _("Focus Channel"), menu, + str_copy); menu_quick_item_with_callback (menu_chan_part, _("Part Channel"), menu, str_copy); menu_quick_item_with_callback (menu_chan_cycle, _("Cycle Channel"), menu, -- cgit 1.4.1 From 5d5838e71247e43b6e8db306055d8f93326ef86b Mon Sep 17 00:00:00 2001 From: delthas <1863865+delthas@users.noreply.github.com> Date: Sun, 19 Apr 2020 05:43:27 +0200 Subject: 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. --- src/fe-gtk/maingui.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/fe-gtk') diff --git a/src/fe-gtk/maingui.c b/src/fe-gtk/maingui.c index 604ad3c8..335522a0 100644 --- a/src/fe-gtk/maingui.c +++ b/src/fe-gtk/maingui.c @@ -54,7 +54,7 @@ #include "gtkutil.h" #ifdef G_OS_WIN32 -#include +#include #endif #define GUI_SPACING (3) -- cgit 1.4.1 From 83daed87061830a140dcbf425ffa78c0ac0f4d4c Mon Sep 17 00:00:00 2001 From: delthas Date: Sun, 19 Apr 2020 20:35:37 +0200 Subject: 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. --- src/fe-gtk/meson.build | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/fe-gtk') diff --git a/src/fe-gtk/meson.build b/src/fe-gtk/meson.build index 1fe741ee..3dfc7427 100644 --- a/src/fe-gtk/meson.build +++ b/src/fe-gtk/meson.build @@ -80,6 +80,10 @@ resources = gnome.compile_resources('resources', extra_args: ['--manual-register'] ) +if host_machine.system() == 'windows' + hexchat_gtk_ldflags += '-Wl,-e,mainCRTStartup' +endif + executable('hexchat', sources: resources + hexchat_gtk_sources, dependencies: hexchat_gtk_deps, -- cgit 1.4.1 From 71eb79fee4881a9ad06012a642b8deb3b4453c77 Mon Sep 17 00:00:00 2001 From: Paul Wise Date: Mon, 3 Aug 2020 09:26:26 +0800 Subject: 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 c361bdca6afdc933eeac35732334464990295cd4 See-also: https://github.com/hexchat/hexchat/pull/2255#issuecomment-475841824 --- src/fe-gtk/menu.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/fe-gtk') diff --git a/src/fe-gtk/menu.c b/src/fe-gtk/menu.c index aba3d745..233715e5 100644 --- a/src/fe-gtk/menu.c +++ b/src/fe-gtk/menu.c @@ -1030,8 +1030,11 @@ menu_chanmenu (struct session *sess, GdkEventButton * event, char *chan) { GtkWidget *menu; int is_joined = FALSE; + session * chan_session; - if (find_channel (sess->server, chan)) + chan_session = find_channel (sess->server, chan); + + if (chan_session) is_joined = TRUE; g_free (str_copy); @@ -1047,8 +1050,9 @@ menu_chanmenu (struct session *sess, GdkEventButton * event, char *chan) str_copy); else { - menu_quick_item_with_callback (menu_chan_focus, _("Focus Channel"), menu, - str_copy); + if (chan_session != current_sess) + menu_quick_item_with_callback (menu_chan_focus, _("Focus Channel"), menu, + str_copy); menu_quick_item_with_callback (menu_chan_part, _("Part Channel"), menu, str_copy); menu_quick_item_with_callback (menu_chan_cycle, _("Cycle Channel"), menu, -- cgit 1.4.1 From 163608d7fd861c2c4911a38f45be484c88626bdc Mon Sep 17 00:00:00 2001 From: John Levon Date: Mon, 7 Sep 2020 17:53:31 +0100 Subject: Use pango_font_metrics_get_height() to calculate font height (#2500) --- src/fe-gtk/xtext.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'src/fe-gtk') diff --git a/src/fe-gtk/xtext.c b/src/fe-gtk/xtext.c index fac0c4e6..418bb4da 100644 --- a/src/fe-gtk/xtext.c +++ b/src/fe-gtk/xtext.c @@ -283,8 +283,24 @@ backend_font_open (GtkXText *xtext, char *name) metrics = pango_context_get_metrics (context, xtext->font->font, lang); xtext->font->ascent = pango_font_metrics_get_ascent (metrics) / PANGO_SCALE; xtext->font->descent = pango_font_metrics_get_descent (metrics) / PANGO_SCALE; + + /* + * In later versions of pango, a font's height should be calculated like + * this to account for line gap; a typical symptom of not doing so is + * cutting off the underscore on some fonts. + */ +#if PANGO_VERSION_CHECK(1, 44, 0) + xtext->fontsize = pango_font_metrics_get_height (metrics) / PANGO_SCALE + 1; + + if (xtext->fontsize == 0) + xtext->fontsize = xtext->font->ascent + xtext->font->descent; +#else + xtext->fontsize = xtext->font->ascent + xtext->font->descent; +#endif + pango_font_metrics_unref (metrics); } + static int backend_get_text_width_emph (GtkXText *xtext, guchar *str, int len, int emphasis) { @@ -3479,8 +3495,6 @@ gtk_xtext_set_font (GtkXText *xtext, char *name) if (xtext->font == NULL) return FALSE; - xtext->fontsize = xtext->font->ascent + xtext->font->descent; - { char *time_str; int stamp_size = xtext_get_stamp_str (time(0), &time_str); -- cgit 1.4.1 From f0554b27df459b7794d990f9da72318e2e3d2620 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sun, 23 May 2021 19:01:39 +0100 Subject: Add a workaround for icons not scaling right on HiDPI screens. (#2573) --- src/fe-gtk/pixmaps.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'src/fe-gtk') diff --git a/src/fe-gtk/pixmaps.c b/src/fe-gtk/pixmaps.c index 6c6cfaeb..9bdf46fc 100644 --- a/src/fe-gtk/pixmaps.c +++ b/src/fe-gtk/pixmaps.c @@ -89,7 +89,9 @@ pixmap_load_from_file (char *filename) static GdkPixbuf * load_pixmap (const char *filename) { - GdkPixbuf *pixbuf; + GdkPixbuf *pixbuf, *scaledpixbuf; + const char *scale; + int iscale; gchar *path = g_strdup_printf ("%s" G_DIR_SEPARATOR_S "icons" G_DIR_SEPARATOR_S "%s.png", get_xdir (), filename); pixbuf = gdk_pixbuf_new_from_file (path, 0); @@ -102,6 +104,24 @@ load_pixmap (const char *filename) g_free (path); } + // Hack to avoid unbearably tiny icons on HiDPI screens. + scale = g_getenv ("GDK_SCALE"); + if (scale) + { + iscale = atoi (scale); + if (iscale > 0) + { + scaledpixbuf = gdk_pixbuf_scale_simple (pixbuf, gdk_pixbuf_get_width (pixbuf) * iscale, + gdk_pixbuf_get_height (pixbuf) * iscale, GDK_INTERP_BILINEAR); + + if (scaledpixbuf) + { + g_object_unref (pixbuf); + pixbuf = scaledpixbuf; + } + } + } + g_warn_if_fail (pixbuf != NULL); return pixbuf; -- cgit 1.4.1 From 939ec7a16e205e974cfe1a97c2ff4974e763c7fa Mon Sep 17 00:00:00 2001 From: DjLegolas Date: Sun, 12 Apr 2020 10:32:31 +0300 Subject: Updated Toolset to v142 --- plugins/checksum/checksum.vcxproj | 2 +- plugins/exec/exec.vcxproj | 2 +- plugins/fishlim/fishlim.vcxproj | 2 +- plugins/lua/lua.vcxproj | 2 +- plugins/perl/perl.vcxproj | 2 +- plugins/python/python2.vcxproj | 2 +- plugins/python/python3.vcxproj | 2 +- plugins/sysinfo/sysinfo.vcxproj | 2 +- plugins/upd/upd.vcxproj | 2 +- plugins/winamp/winamp.vcxproj | 2 +- src/common/common.vcxproj | 2 +- src/fe-gtk/fe-gtk.vcxproj | 2 +- .../notifications/notifications-winrt.vcxproj | 124 ++++++++++----------- src/fe-text/fe-text.vcxproj | 2 +- src/htm/Properties/Resources.Designer.cs | 2 +- src/htm/Properties/Settings.Designer.cs | 2 +- src/htm/app.config | 2 +- src/htm/htm.csproj | 2 +- src/libenchant_win8/libenchant_win8.vcxproj | 2 +- win32/copy/copy.vcxproj | 2 +- win32/installer/installer.vcxproj | 2 +- win32/nls/nls.vcxproj | 2 +- 22 files changed, 83 insertions(+), 83 deletions(-) (limited to 'src/fe-gtk') diff --git a/plugins/checksum/checksum.vcxproj b/plugins/checksum/checksum.vcxproj index 7924be88..fba08cce 100644 --- a/plugins/checksum/checksum.vcxproj +++ b/plugins/checksum/checksum.vcxproj @@ -1,7 +1,7 @@  - v140 + v142 DynamicLibrary diff --git a/plugins/exec/exec.vcxproj b/plugins/exec/exec.vcxproj index e34f10e6..ceb11843 100644 --- a/plugins/exec/exec.vcxproj +++ b/plugins/exec/exec.vcxproj @@ -1,7 +1,7 @@  - v140 + v142 DynamicLibrary diff --git a/plugins/fishlim/fishlim.vcxproj b/plugins/fishlim/fishlim.vcxproj index 157c7928..579c2436 100644 --- a/plugins/fishlim/fishlim.vcxproj +++ b/plugins/fishlim/fishlim.vcxproj @@ -1,7 +1,7 @@  - v140 + v142 DynamicLibrary diff --git a/plugins/lua/lua.vcxproj b/plugins/lua/lua.vcxproj index 22afe729..5c0be68e 100644 --- a/plugins/lua/lua.vcxproj +++ b/plugins/lua/lua.vcxproj @@ -1,7 +1,7 @@  - v140 + v142 DynamicLibrary diff --git a/plugins/perl/perl.vcxproj b/plugins/perl/perl.vcxproj index 8b5069c0..92c27408 100644 --- a/plugins/perl/perl.vcxproj +++ b/plugins/perl/perl.vcxproj @@ -1,7 +1,7 @@  - v140 + v142 DynamicLibrary diff --git a/plugins/python/python2.vcxproj b/plugins/python/python2.vcxproj index 0b098112..42895ce4 100644 --- a/plugins/python/python2.vcxproj +++ b/plugins/python/python2.vcxproj @@ -1,7 +1,7 @@  - v140 + v142 DynamicLibrary diff --git a/plugins/python/python3.vcxproj b/plugins/python/python3.vcxproj index 5868d3b0..3eb86c2a 100644 --- a/plugins/python/python3.vcxproj +++ b/plugins/python/python3.vcxproj @@ -1,7 +1,7 @@  - v140 + v142 DynamicLibrary diff --git a/plugins/sysinfo/sysinfo.vcxproj b/plugins/sysinfo/sysinfo.vcxproj index b1c7c8f0..a3ff0f8a 100644 --- a/plugins/sysinfo/sysinfo.vcxproj +++ b/plugins/sysinfo/sysinfo.vcxproj @@ -1,7 +1,7 @@  - v140 + v142 DynamicLibrary Unicode diff --git a/plugins/upd/upd.vcxproj b/plugins/upd/upd.vcxproj index 16f96e45..5dc497b4 100644 --- a/plugins/upd/upd.vcxproj +++ b/plugins/upd/upd.vcxproj @@ -1,7 +1,7 @@  - v140 + v142 DynamicLibrary diff --git a/plugins/winamp/winamp.vcxproj b/plugins/winamp/winamp.vcxproj index ccc04e72..78367ae9 100644 --- a/plugins/winamp/winamp.vcxproj +++ b/plugins/winamp/winamp.vcxproj @@ -1,7 +1,7 @@  - v140 + v142 DynamicLibrary diff --git a/src/common/common.vcxproj b/src/common/common.vcxproj index 33a883bf..bc191f43 100644 --- a/src/common/common.vcxproj +++ b/src/common/common.vcxproj @@ -1,7 +1,7 @@  - v140 + v142 StaticLibrary diff --git a/src/fe-gtk/fe-gtk.vcxproj b/src/fe-gtk/fe-gtk.vcxproj index 61d0a074..06df36dc 100644 --- a/src/fe-gtk/fe-gtk.vcxproj +++ b/src/fe-gtk/fe-gtk.vcxproj @@ -1,7 +1,7 @@  - v140 + v142 Application diff --git a/src/fe-gtk/notifications/notifications-winrt.vcxproj b/src/fe-gtk/notifications/notifications-winrt.vcxproj index 1f392b6b..d720c864 100644 --- a/src/fe-gtk/notifications/notifications-winrt.vcxproj +++ b/src/fe-gtk/notifications/notifications-winrt.vcxproj @@ -1,62 +1,62 @@ - - - - - Release - Win32 - - - Release - x64 - - - - - true - - - - {C53145CC-D021-40C9-B97C-0249AB9A43C9} - Win32Proj - notifications-winrt - notifications-winrt - - - - v140 - DynamicLibrary - Unicode - - - - - - hcnotifications-winrt - $(HexChatRel)plugins\ - - - - WIN32;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY;_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT;NDEBUG;_WINDOWS;_USRDLL;NOTIFICATIONS_EXPORTS;%(PreprocessorDefinitions) - true - $(VCInstallDir)vcpackages;$(FrameworkSdkDir)References\CommonConfiguration\Neutral;%(AdditionalUsingDirectories) - - - $(DepLibs);mincore.lib;runtimeobject.lib;%(AdditionalDependencies) - 6.03 - $(DepsRoot)\lib;%(AdditionalLibraryDirectories) - - - - - WIN32;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY;_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT;NDEBUG;_WINDOWS;_USRDLL;NOTIFICATIONS_EXPORTS;%(PreprocessorDefinitions) - true - $(VCInstallDir)vcpackages;$(FrameworkSdkDir)References\CommonConfiguration\Neutral;%(AdditionalUsingDirectories) - - - $(DepLibs);mincore.lib;runtimeobject.lib;%(AdditionalDependencies) - 6.03 - $(DepsRoot)\lib;%(AdditionalLibraryDirectories) - - - - + + + + + Release + Win32 + + + Release + x64 + + + + + true + + + + {C53145CC-D021-40C9-B97C-0249AB9A43C9} + Win32Proj + notifications-winrt + notifications-winrt + + + + v142 + DynamicLibrary + Unicode + + + + + + hcnotifications-winrt + $(HexChatRel)plugins\ + + + + WIN32;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY;_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT;NDEBUG;_WINDOWS;_USRDLL;NOTIFICATIONS_EXPORTS;%(PreprocessorDefinitions) + true + $(VCInstallDir)vcpackages;$(FrameworkSdkDir)References\CommonConfiguration\Neutral;%(AdditionalUsingDirectories) + + + $(DepLibs);mincore.lib;runtimeobject.lib;%(AdditionalDependencies) + 6.03 + $(DepsRoot)\lib;%(AdditionalLibraryDirectories) + + + + + WIN32;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY;_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT;NDEBUG;_WINDOWS;_USRDLL;NOTIFICATIONS_EXPORTS;%(PreprocessorDefinitions) + true + $(VCInstallDir)vcpackages;$(FrameworkSdkDir)References\CommonConfiguration\Neutral;%(AdditionalUsingDirectories) + + + $(DepLibs);mincore.lib;runtimeobject.lib;%(AdditionalDependencies) + 6.03 + $(DepsRoot)\lib;%(AdditionalLibraryDirectories) + + + + diff --git a/src/fe-text/fe-text.vcxproj b/src/fe-text/fe-text.vcxproj index 6c7c25a8..75b64a12 100644 --- a/src/fe-text/fe-text.vcxproj +++ b/src/fe-text/fe-text.vcxproj @@ -1,7 +1,7 @@  - v140 + v142 Application diff --git a/src/htm/Properties/Resources.Designer.cs b/src/htm/Properties/Resources.Designer.cs index 7627ee06..8e2cd74a 100644 --- a/src/htm/Properties/Resources.Designer.cs +++ b/src/htm/Properties/Resources.Designer.cs @@ -19,7 +19,7 @@ namespace thememan.Properties { // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class Resources { diff --git a/src/htm/Properties/Settings.Designer.cs b/src/htm/Properties/Settings.Designer.cs index cf679280..c8c467e8 100644 --- a/src/htm/Properties/Settings.Designer.cs +++ b/src/htm/Properties/Settings.Designer.cs @@ -12,7 +12,7 @@ namespace thememan.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.9.0.0")] internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); diff --git a/src/htm/app.config b/src/htm/app.config index ad1957f6..b33a2051 100644 --- a/src/htm/app.config +++ b/src/htm/app.config @@ -1,3 +1,3 @@ - + diff --git a/src/htm/htm.csproj b/src/htm/htm.csproj index eaf57a0f..7c96d274 100644 --- a/src/htm/htm.csproj +++ b/src/htm/htm.csproj @@ -12,7 +12,7 @@ thememan 512 false - v4.5.2 + v4.6.1 publish\ diff --git a/src/libenchant_win8/libenchant_win8.vcxproj b/src/libenchant_win8/libenchant_win8.vcxproj index 3496f978..a6cbdad6 100644 --- a/src/libenchant_win8/libenchant_win8.vcxproj +++ b/src/libenchant_win8/libenchant_win8.vcxproj @@ -19,7 +19,7 @@ DynamicLibrary true - v140 + v142 diff --git a/win32/copy/copy.vcxproj b/win32/copy/copy.vcxproj index 72f2c032..b26d7e28 100644 --- a/win32/copy/copy.vcxproj +++ b/win32/copy/copy.vcxproj @@ -1,7 +1,7 @@  - v140 + v142 Application diff --git a/win32/installer/installer.vcxproj b/win32/installer/installer.vcxproj index 3458b658..3cc11e44 100644 --- a/win32/installer/installer.vcxproj +++ b/win32/installer/installer.vcxproj @@ -1,7 +1,7 @@  - v140 + v142 Application diff --git a/win32/nls/nls.vcxproj b/win32/nls/nls.vcxproj index aa60abff..759ae14d 100644 --- a/win32/nls/nls.vcxproj +++ b/win32/nls/nls.vcxproj @@ -1,7 +1,7 @@  - v140 + v142 Application -- cgit 1.4.1 From e2ec2c9ab71a0678591f78c8657eb8eb1fe1ae10 Mon Sep 17 00:00:00 2001 From: DjLegolas Date: Sun, 12 Apr 2020 15:13:03 +0300 Subject: Fixed notifications-winrt compilation error Both platform.winmd and windows.winmd were unable to find so added the location of each to the compiler. --- src/fe-gtk/notifications/notifications-winrt.vcxproj | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/fe-gtk') diff --git a/src/fe-gtk/notifications/notifications-winrt.vcxproj b/src/fe-gtk/notifications/notifications-winrt.vcxproj index d720c864..2f6ffc99 100644 --- a/src/fe-gtk/notifications/notifications-winrt.vcxproj +++ b/src/fe-gtk/notifications/notifications-winrt.vcxproj @@ -1,4 +1,4 @@ - + @@ -38,7 +38,8 @@ WIN32;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY;_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT;NDEBUG;_WINDOWS;_USRDLL;NOTIFICATIONS_EXPORTS;%(PreprocessorDefinitions) true - $(VCInstallDir)vcpackages;$(FrameworkSdkDir)References\CommonConfiguration\Neutral;%(AdditionalUsingDirectories) + $(VC_LibraryPath_VC_x86_Store)\references;$(WindowsSDK_UnionMetadataPath);$(VCInstallDir)vcpackages;$(FrameworkSdkDir)References\CommonConfiguration\Neutral;%(AdditionalUsingDirectories) + true $(DepLibs);mincore.lib;runtimeobject.lib;%(AdditionalDependencies) @@ -50,7 +51,8 @@ WIN32;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY;_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT;NDEBUG;_WINDOWS;_USRDLL;NOTIFICATIONS_EXPORTS;%(PreprocessorDefinitions) true - $(VCInstallDir)vcpackages;$(FrameworkSdkDir)References\CommonConfiguration\Neutral;%(AdditionalUsingDirectories) + $(VC_LibraryPath_VC_x86_Store)\references;$(WindowsSDK_UnionMetadataPath);$(VCInstallDir)vcpackages;$(FrameworkSdkDir)References\CommonConfiguration\Neutral;%(AdditionalUsingDirectories) + true $(DepLibs);mincore.lib;runtimeobject.lib;%(AdditionalDependencies) -- cgit 1.4.1 From d3545f37cd5f551ed8bc0ab7b20e5c8140adc0a6 Mon Sep 17 00:00:00 2001 From: Patrick Griffis Date: Sun, 23 May 2021 21:15:43 -0500 Subject: Change default network to Libera.Chat --- src/common/servlist.c | 4 ++-- src/fe-gtk/joind.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/fe-gtk') diff --git a/src/common/servlist.c b/src/common/servlist.c index de75c8b9..93557f97 100644 --- a/src/common/servlist.c +++ b/src/common/servlist.c @@ -240,7 +240,7 @@ static const struct defaultserver def[] = /* Self signed */ {0, "irc.librairc.net"}, - {"Libera Chat", 0, 0, 0, LOGIN_SASL, 0, TRUE}, + {"Libera.Chat", 0, 0, 0, LOGIN_SASL, 0, TRUE}, {0, "irc.libera.chat"}, #ifdef USE_OPENSSL @@ -942,7 +942,7 @@ servlist_load_defaults (void) { int i = 0, j = 0; ircnet *net = NULL; - guint def_hash = g_str_hash ("freenode"); + guint def_hash = g_str_hash ("Libera.Chat"); while (1) { diff --git a/src/fe-gtk/joind.c b/src/fe-gtk/joind.c index f1d3da50..ce3cbcae 100644 --- a/src/fe-gtk/joind.c +++ b/src/fe-gtk/joind.c @@ -247,7 +247,7 @@ joind_show_dialog (server *serv) G_CALLBACK (joind_ok_cb), serv); if (serv->network) - if (g_ascii_strcasecmp(((ircnet*)serv->network)->name, "freenode") == 0) + if (g_ascii_strcasecmp(((ircnet*)serv->network)->name, "Libera.Chat") == 0) { gtk_entry_set_text (GTK_ENTRY (entry1), "#hexchat"); } -- cgit 1.4.1 From da26097aab554c44540c25f0741dc19f6e92cc41 Mon Sep 17 00:00:00 2001 From: BakasuraRCE Date: Wed, 29 Jul 2020 09:50:12 -0500 Subject: notification: Implement notification option for channels --- src/common/chanopt.c | 2 ++ src/common/hexchat.c | 1 + src/common/hexchat.h | 1 + src/common/plugin.c | 6 +++++- src/fe-gtk/maingui.c | 26 ++++++++++++++++++++++---- src/fe-gtk/plugin-notification.c | 40 ++++++++++++++++++++++++++++++++++++---- 6 files changed, 67 insertions(+), 9 deletions(-) (limited to 'src/fe-gtk') diff --git a/src/common/chanopt.c b/src/common/chanopt.c index 1870c99c..67cb46cf 100644 --- a/src/common/chanopt.c +++ b/src/common/chanopt.c @@ -58,6 +58,7 @@ typedef struct static const channel_options chanopt[] = { + {"alert_balloon", NULL, S_F(alert_balloon)}, {"alert_beep", "BEEP", S_F(alert_beep)}, {"alert_taskbar", NULL, S_F(alert_taskbar)}, {"alert_tray", "TRAY", S_F(alert_tray)}, @@ -182,6 +183,7 @@ typedef struct { /* Per-Channel Alerts */ /* use a byte, because we need a pointer to each element */ + guint8 alert_balloon; guint8 alert_beep; guint8 alert_taskbar; guint8 alert_tray; diff --git a/src/common/hexchat.c b/src/common/hexchat.c index e9a9a7fc..8702c63d 100644 --- a/src/common/hexchat.c +++ b/src/common/hexchat.c @@ -493,6 +493,7 @@ session_new (server *serv, char *from, int type, int focus) sess->logfd = -1; sess->type = type; + sess->alert_balloon = SET_DEFAULT; sess->alert_beep = SET_DEFAULT; sess->alert_taskbar = SET_DEFAULT; sess->alert_tray = SET_DEFAULT; diff --git a/src/common/hexchat.h b/src/common/hexchat.h index f9ca006b..d8effa1f 100644 --- a/src/common/hexchat.h +++ b/src/common/hexchat.h @@ -363,6 +363,7 @@ typedef struct session { /* Per-Channel Alerts */ /* use a byte, because we need a pointer to each element */ + guint8 alert_balloon; guint8 alert_beep; guint8 alert_taskbar; guint8 alert_tray; diff --git a/src/common/plugin.c b/src/common/plugin.c index 00cf4599..f2c2ecfb 100644 --- a/src/common/plugin.c +++ b/src/common/plugin.c @@ -138,7 +138,9 @@ enum CHANNEL_FLAG_TRAY_UNSET = 1 << 18, CHANNEL_FLAG_TASKBAR = 1 << 19, CHANNEL_FLAG_TASKBAR_UNSET = 1 << 20, - CHANNEL_FLAG_COUNT = 21 + CHANNEL_FLAG_BALLOON = 1 << 21, + CHANNEL_FLAG_BALLOON_UNSET = 1 << 22, + CHANNEL_FLAG_COUNT = 23 }; GSList *plugin_list = NULL; /* export for plugingui.c */ @@ -1633,6 +1635,8 @@ hexchat_list_int (hexchat_plugin *ph, hexchat_list *xlist, const char *name) channel_flags[18] = ((struct session *)data)->alert_tray == SET_DEFAULT; channel_flags[19] = ((struct session *)data)->alert_taskbar; channel_flags[20] = ((struct session *)data)->alert_taskbar == SET_DEFAULT; + channel_flags[21] = ((struct session *)data)->alert_balloon; + channel_flags[22] = ((struct session *)data)->alert_balloon == SET_DEFAULT; /* Set flags */ for (channel_flag = 0; channel_flag < CHANNEL_FLAG_COUNT; ++channel_flag) { diff --git a/src/fe-gtk/maingui.c b/src/fe-gtk/maingui.c index 335522a0..4e5baaa0 100644 --- a/src/fe-gtk/maingui.c +++ b/src/fe-gtk/maingui.c @@ -1520,14 +1520,32 @@ static void mg_create_alertmenu (session *sess, GtkWidget *menu) { GtkWidget *submenu; + int hex_balloon, hex_beep, hex_tray, hex_flash; - submenu = menu_quick_sub (_("_Extra Alerts"), menu, NULL, XCMENU_MNEMONIC, -1); - mg_perchan_menu_item (_("Beep on _Message"), submenu, &sess->alert_beep, prefs.hex_input_beep_chans); + switch (sess->type) { + case SESS_DIALOG: + hex_balloon = prefs.hex_input_balloon_priv; + hex_beep = prefs.hex_input_beep_priv; + hex_tray = prefs.hex_input_tray_priv; + hex_flash = prefs.hex_input_flash_priv; + break; + default: + hex_balloon = prefs.hex_input_balloon_chans; + hex_beep = prefs.hex_input_beep_chans; + hex_tray = prefs.hex_input_tray_chans; + hex_flash = prefs.hex_input_flash_chans; + } + + submenu = menu_quick_sub(_("_Extra Alerts"), menu, NULL, XCMENU_MNEMONIC, -1); + + mg_perchan_menu_item(_("Show Notifications"), submenu, &sess->alert_balloon, hex_balloon); + + mg_perchan_menu_item(_("Beep on _Message"), submenu, &sess->alert_beep, hex_beep); - mg_perchan_menu_item (_("Blink Tray _Icon"), submenu, &sess->alert_tray, prefs.hex_input_tray_chans); + mg_perchan_menu_item(_("Blink Tray _Icon"), submenu, &sess->alert_tray, hex_tray); - mg_perchan_menu_item (_("Blink Task _Bar"), submenu, &sess->alert_taskbar, prefs.hex_input_flash_chans); + mg_perchan_menu_item(_("Blink Task _Bar"), submenu, &sess->alert_taskbar, hex_flash); } static void diff --git a/src/fe-gtk/plugin-notification.c b/src/fe-gtk/plugin-notification.c index 3ac89244..29478d7a 100644 --- a/src/fe-gtk/plugin-notification.c +++ b/src/fe-gtk/plugin-notification.c @@ -25,6 +25,9 @@ static hexchat_plugin *ph; +const int CHANNEL_FLAG_BALLOON = 1 << 21; +const int CHANNEL_FLAG_BALLOON_UNSET = 1 << 22; + static gboolean should_alert (void) { @@ -117,10 +120,24 @@ static int incoming_message_cb (char *word[], gpointer userdata) { int message; + int flags; + int alert = 0; + + flags = hexchat_list_int(ph, NULL, "flags"); + + /* Let sure that can alert */ + if (should_alert()) { + /* Follow the channel rules if set */ + if (!(flags & CHANNEL_FLAG_BALLOON_UNSET)) { + alert = (flags & CHANNEL_FLAG_BALLOON); + } else { + /* Else follow global environment */ + alert = (hexchat_get_prefs(ph, "input_balloon_chans", NULL, &message) == 3 && message); + } + } - if (hexchat_get_prefs (ph, "input_balloon_chans", NULL, &message) == 3 && message && should_alert ()) - { - show_notificationf (word[2], _("Channel message from: %s (%s)"), word[1], hexchat_get_info (ph, "channel")); + if (alert) { + show_notificationf(word[2], _("Channel message from: %s (%s)"), word[1], hexchat_get_info(ph, "channel")); } return HEXCHAT_EAT_NONE; } @@ -129,8 +146,23 @@ static int incoming_priv_cb (char *word[], gpointer userdata) { int priv; + int flags; + int alert = 0; + + flags = hexchat_list_int(ph, NULL, "flags"); + + /* Let sure that can alert */ + if (should_alert()) { + /* Follow the private rules if set */ + if (!(flags & CHANNEL_FLAG_BALLOON_UNSET)) { + alert = (flags & CHANNEL_FLAG_BALLOON); + } else { + /* Else follow global environment */ + alert = (hexchat_get_prefs(ph, "input_balloon_priv", NULL, &priv) == 3 && priv); + } + } - if (hexchat_get_prefs (ph, "input_balloon_priv", NULL, &priv) == 3 && priv && should_alert ()) + if (alert) { const char *network = hexchat_get_info (ph, "network"); if (!network) -- cgit 1.4.1